Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[gsoc_spectest] tests for handling of unknown metasyntax and escaping…

… (added 6 tests)

git-svn-id: http://svn.pugscode.org/pugs@21463 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit 2a013e1a2d5a246de52a18baddba2d57881098f6 1 parent 23d747a
Auzon authored
Showing with 16 additions and 0 deletions.
  1. +16 −0 S05-metasyntax/unknown.t
View
16 S05-metasyntax/unknown.t
@@ -0,0 +1,16 @@
+use v6;
+use Test;
+
+plan 6;
+
+# L<S05/Simplified lexical parsing of patterns/not all non-identifier glyphs are currently meaningful as metasyntax>
+
+# testing unknown metasyntax handling
+
+eval_dies_ok('"aa!" ~~ /!/', '"!" is not valid metasyntax');
+lives_ok({"aa!" ~~ /\!/}, 'escaped "!" is valid');
+lives_ok({"aa!" ~~ /'!'/}, 'quoted "!" is valid');
+
+eval_dies_ok('"aa!" ~~ /\a/', 'escaped "a" is not valid metasyntax');
+lives_ok({"aa!" ~~ /a/}, '"a" is valid');
+lives_ok({"aa!" ~~ /'a'/}, 'quoted "a" is valid');
Please sign in to comment.
Something went wrong with that request. Please try again.