Results for regex.test.sh

statusoshosh-cpp
pass 2626
FAIL 22
total2828
caseoshosh-cppdescription
0pass pass BASH_REMATCH
1pass pass Match is unanchored at both ends
2pass pass Failed match
3pass pass Regex quoted with \ -- preferred in bash
4pass pass Regex quoted with single quotes
5pass pass Regex quoted with double quotes
6pass pass Fix single quotes by storing in variable
7pass pass Fix single quotes by storing in variable
8pass pass Double quoting pat variable -- again bash doesn't like it.
9pass pass Mixing quoted and unquoted parts
10pass pass Regex with == and not =~ is parse error, different lexer mode required
11pass pass Omitting ( )
12pass pass Malformed regex
13FAIL FAIL Regex with char class containing space
detailsdetails
14FAIL FAIL Operators and space lose meaning inside ()
detailsdetails
15pass pass Regex with |
16pass pass Regex to match literal brackets []
17pass pass Regex to match literals . ^ $ etc.
18pass pass Unquoted { is a regex parse error
19pass pass Fatal error inside [[ =~ ]]
20pass pass Quoted { and +
21pass pass Escaped {
22pass pass Escaped { stored in variable first
23pass pass regex with ?
24pass pass regex with unprintable characters
25pass pass pattern $f(x) -- regression
26pass pass pattern a=(1)
27pass pass pattern @f(x)
52 passed, 0 OK, 0 not implemented, 0 BUG, 4 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

osh13 Regex with char class containing space

[osh stdout] Expected 'true\n', got ''
[osh status] Expected 0, got 2

stdout:
stderr: 
  [[ 'ba ba ' =~ ([a b]+) ]] && echo true
                     ^
[ stdin ]:1: Expected ]]
osh-cpp13 Regex with char class containing space

[osh-cpp stdout] Expected 'true\n', got ''
[osh-cpp status] Expected 0, got 2

stdout:
stderr: 
  [[ 'ba ba ' =~ ([a b]+) ]] && echo true
                     ^
[ stdin ]:1: Expected ]]
osh14 Operators and space lose meaning inside ()

[osh stdout] Expected 'true\n', got ''
[osh status] Expected 0, got 2

stdout:
stderr: 
  [[ '< >' =~ (< >) ]] && echo true
                 ^
[ stdin ]:1: Expected ]]
osh-cpp14 Operators and space lose meaning inside ()

[osh-cpp stdout] Expected 'true\n', got ''
[osh-cpp status] Expected 0, got 2

stdout:
stderr: 
  [[ '< >' =~ (< >) ]] && echo true
                 ^
[ stdin ]:1: Expected ]]