🌌 SpectraShell

🌌 SpectraShell

Current path: home/.cpan/build/YAML-LibYAML-v0.902.0-0/t/



⬆️ Go up: YAML-LibYAML-v0.902.0-0

📄 Viewing: error.t

use FindBin '$Bin';
use lib $Bin;
use TestYAMLTests tests => 25;

filters {
    error => ['lines', 'chomp'],
};

run {
    my $test = shift;
    eval {
        Load($test->yaml);
    };
    for my $error ($test->error) {
        if ($error =~ s/^!//) {
            my $re = qr/$error/;
            unlike $@, $re, $test->name . " (!~ /$error/)";
        }
        else {
            my $re = qr/$error/;
            like $@, $re, $test->name . " (=~ /$error/)";
        }
    }
};

__DATA__
=== Bad hash indentation
+++ yaml
foo: 2
 bar: 4
+++ error
mapping values are not allowed in this context
document: 1
line: 2
column: 5

=== Unquoted * as hash key
+++ yaml
*: foo
+++ error
did not find expected alphabetic or numeric character
document: 1
column: 2
while scanning an alias

=== Unquoted * as hash value
+++ yaml
---
foo bar: *
+++ error
did not find expected alphabetic or numeric character
document: 1
line: 2
column: 11
while scanning an alias

=== Unquoted * as scalar
+++ yaml
--- xxx
--- * * *
+++ error
did not find expected alphabetic or numeric character
document: 2
line: 2
column: 6
while scanning an alias

=== Bad tag for array
+++ yaml
--- !!foo []
+++ error
bad tag found for array: 'tag:yaml.org,2002:foo'
document: 1

=== Bad tag for hash
+++ yaml
--- !!!foo {}
+++ error
bad tag found for hash: 'tag:yaml.org,2002:!foo'
document: 1
!line:
!column:

=== https://bitbucket.org/xi/libyaml/issue/10/wrapped-strings-cause-assert-failure
+++ yaml
  x: "
" y: z
+++ error
did not find expected key



📁

ABOUT US

SAI Connections is an autism treatment and therapy centre in Mumbai, India. Since 2004, we have been helping individuals with autism spectrum disorder, ADHD and other learning disabilities to develop the necessary skills needed to live an empowered life. We work towards empowering individuals to live a life with dignity that every human deserves.

 

Read More

SERVICES OFFERED

Our spacious centre is the perfect location for children with autism to develop skills which help them adjust better to their environment. We also offer provide training to parents of autistic individuals to become better guides and understand their child, and training and certification to professionals interested in becoming consultants in the field of learning disabilities.

 

Read More

BLOG

Insights on dealing with autism spectrum disorder as a family member, real-life success stories and latest news in the world about autism, all rolled into 1 place.

  •  
    40
    Shares
  • 13
  • 4
  • 3
  • 5
  • 15
  •