Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 42 lines (31 sloc) 1.044 kb
2a013e1a »
2008-07-23 [gsoc_spectest] tests for handling of unknown metasyntax and escaping…
1 use v6;
2 use Test;
3
6dff118d »
2012-07-15 unescaped "-" is not valid regular expression metasyntax, RT #77110
4 plan 11;
2a013e1a »
2008-07-23 [gsoc_spectest] tests for handling of unknown metasyntax and escaping…
5
6 # L<S05/Simplified lexical parsing of patterns/not all non-identifier glyphs are currently meaningful as metasyntax>
7
8 # testing unknown metasyntax handling
9
10 eval_dies_ok('"aa!" ~~ /!/', '"!" is not valid metasyntax');
11 lives_ok({"aa!" ~~ /\!/}, 'escaped "!" is valid');
12 lives_ok({"aa!" ~~ /'!'/}, 'quoted "!" is valid');
13
14 eval_dies_ok('"aa!" ~~ /\a/', 'escaped "a" is not valid metasyntax');
15 lives_ok({"aa!" ~~ /a/}, '"a" is valid');
16 lives_ok({"aa!" ~~ /'a'/}, 'quoted "a" is valid');
fc2d82ce »
2009-07-04 [t] merge braces_in_rules.t into spec/S05-metasyntax/unknown.t
17
18 # used to be a pugs bug
19
21ca56b0 »
2010-04-12 [t/spec] fudge S05-metasyntax/unknown.t for rakudo; correct a test
20 {
21 my rule foo { \{ };
22 ok '{' ~~ /<foo>/, '\\{ in a rule (+)';
23 ok '!' !~~ /<foo>/, '\\{ in a rule (-)';
24 }
fc2d82ce »
2009-07-04 [t] merge braces_in_rules.t into spec/S05-metasyntax/unknown.t
25
b80cf7d8 »
2010-05-30 [t/spec] tests for RT #74832
26 # RT #74832
27 {
a238bb3b »
2011-10-10 remove bogus test
28 dies_ok {eval('/ a+ + /')}, 'Cannot parse regex a+ +';
e5d54f67 »
2011-07-19 fudge a test that nom accidentally passed before
29 #?rakudo todo 'RT 74832'
946cccf8 »
2011-10-16 niecza fudging
30 #?niecza todo
ebfcb8a9 »
2010-06-02 [t/spec] be more liberal with case of detected error message
31 ok "$!" ~~ /:i quantif/, 'error message mentions quantif{y,ier}';
b80cf7d8 »
2010-05-30 [t/spec] tests for RT #74832
32 }
33
6dff118d »
2012-07-15 unescaped "-" is not valid regular expression metasyntax, RT #77110
34 # RT 77110
35 {
36 try { eval '$_ = "0"; s/-/1/;' };
37 ok "$!" ~~ /'Unrecognized regex metacharacter -'/,
38 'unescaped "-" is not valid regular expression metasyntax';
39 }
40
fc2d82ce »
2009-07-04 [t] merge braces_in_rules.t into spec/S05-metasyntax/unknown.t
41 # vim: ft=perl6
Something went wrong with that request. Please try again.