Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix tests for &| and |&
& is tighter than |, so |& is okay, since it implies a leading & in the
right side of |, but &|is not okay, since it implies trailing & in the
left of the |.
  • Loading branch information
TimToady committed Aug 30, 2014
1 parent 782fee4 commit ee1bd8d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions S05-mass/rx.t
Expand Up @@ -827,11 +827,11 @@ ok '&' ~~ /\&/, 'conjunction (&) - literal must be escaped';
eval_dies_ok '/&/', 'conjunction (&) - literal must be escaped';

# todo :pge<leading |>
#### a&|b a&|b /rule error/ alternation and conjunction (&|) - parse error
eval_dies_ok '/a&|b/', 'alternation and conjunction (&|) - parse error';
#### a &| b a /rule error/ trailing & not allowed inside |
eval_dies_ok '/a &| b/', 'alternation and conjunction (&|) - parse error';

#### a|&b a|&b /rule error/ alternation and conjunction (|&) - parse error
eval_dies_ok '/a|&b/', 'alternation and conjunction (|&) - parse error';
#### a |& b a y leading & inside | is okay
ok 'a' ~~ /a |& b/, 'alternation and conjunction (|&) - leading & inside | is okay';

#### |d|b abc y leading alternation ignored
ok 'abc' ~~ /|d|b/, 'leading alternation ignored';
Expand Down

0 comments on commit ee1bd8d

Please sign in to comment.