Results for ysh-regex.test.sh

statusosh
pass 33
FAIL 1
total34
caseoshdescription
0pass /^.$/
1pass /.+/
2pass Repeat {1,3} etc.
3pass d+ digit+ !d+ !digit+
4pass Alternation and sequence
5pass Char Class Ranges
6pass Char Class Set
7pass Range with escaped characters
8pass Group ()
9pass Capture is acceptable as a group
10pass literal ''
11pass Single quotes and splicing (do what "foo $x ${x}" used to)
12pass @splice
13pass splice with capital letters
14pass Matching escaped tab character
15pass Match unicode char
16FAIL Match non-ASCII byte denoted using $'\xff' (TODO: LANG=C)
details
17pass Match non-ASCII byte denoted using \xff
18pass ERE can express Unicode escapes that are in the ASCII range
19pass ERE can't express higher Unicode escapes
20pass non-ASCII bytes must be singleton terms, e.g. '\x7f\xff' is disallowed
21pass Matching escaped tab character
22pass Repeated String Literal With Single Char
23pass Error when unparenthesized string of more than one character is repeated
24pass Instead of $'foo\\bar' use 'foo' \\ 'bar'
25pass Negation of Character Class ![a-z]
26pass Posix and Perl class in class literals
27pass [!d] can't be negated because it's a literal character
28pass [!digit] can't be negated in POSIX ERE (but yes in Perl)
29pass Operator chars in char classes (bash-like)
30pass Operator chars in char classes (eggex)
31pass Matching ] and \ and ' and " in character classes
32pass Matching literal hyphen in character classes
33pass Char class special: ^ - ] \
33 passed, 0 OK, 0 not implemented, 0 BUG, 1 failed, 0 timeouts, 0 cases skipped
1 failed under osh

Details on runs that didn't PASS

osh16 Match non-ASCII byte denoted using $'\xff' (TODO: LANG=C)

[osh stdout] Expected ' 5b ff 5d 0a\nyes\nno\n', got ''
[osh status] Expected 0, got 1

stdout:
stderr: 
  var pat = /[ $'\xff' ]/;
               ^~
[ stdin ]:2: fatal: Use unquoted char literal for byte 255, which is >= 128 (avoid confusing a set of bytes with a sequence)