diff options
Diffstat (limited to 't/load-fails.t')
-rw-r--r-- | t/load-fails.t | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/t/load-fails.t b/t/load-fails.t new file mode 100644 index 0000000..645fa4e --- /dev/null +++ b/t/load-fails.t @@ -0,0 +1,54 @@ +use strict; +use lib -e 't' ? 't' : 'test'; +# This simply tests that a given piece of invalid YAML fails to parse +use TestYAML tests => 4; + +filters { + msg => 'regexp', + yaml => 'yaml_load_or_fail', +}; + +run_like yaml => 'msg'; + +__DATA__ + +=== ++++ SKIP +This test hangs YAML.pm ++++ msg +YAML Error: Inconsistent indentation level ++++ yaml +a: * + + +=== ++++ msg +YAML Error: Inconsistent indentation level ++++ yaml +--- |\ +foo\zbar + + +=== ++++ msg +YAML Error: Unrecognized implicit value ++++ yaml +--- @ 42 + + +=== ++++ msg +YAML Error: Inconsistent indentation level ++++ yaml +--- + - 1 + -2 + + +=== ++++ msg +Unrecognized TAB policy ++++ yaml +--- #TAB:MOBY +- foo + |