Results for regex.test.sh

statusbashzshosh
pass 221022
ok 060
N-I 040
BUG 240
FAIL 002
total242424
casebashzshoshdescription
0pass N-I pass BASH_REMATCH
details
1pass pass pass Match is unanchored at both ends
2pass pass pass Failed match
3pass pass pass Regex quoted with \ -- preferred in bash
4pass ok pass Regex quoted with single quotes
details
5pass ok pass Regex quoted with double quotes
details
6pass pass pass Fix single quotes by storing in variable
7pass pass pass Fix single quotes by storing in variable
8pass ok pass Double quoting pat variable -- again bash doesn't like it.
details
9pass pass pass Mixing quoted and unquoted parts
10pass ok pass Regex with == and not =~ is parse error, different lexer mode required
details
11pass pass pass Omitting ( )
12pass ok pass Malformed regex
details
13pass pass FAIL Regex with char class containing space
details
14pass N-I FAIL Operators and space lose meaning inside ()
detailsdetails
15pass N-I pass Regex with |
details
16pass ok pass Regex to match literal brackets []
details
17pass BUG pass Regex to match literals . ^ $ etc.
details
18BUG BUG pass Unquoted { is a regex parse error
detailsdetails
19BUG pass pass Fatal error inside [[ =~ ]]
details
20pass N-I pass Quoted {
details
21pass BUG pass Escaped {
details
22pass BUG pass Escaped { stored in variable first
details
23pass pass pass regex with ?
54 passed, 6 OK, 4 not implemented, 6 BUG, 2 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

zsh0 BASH_REMATCH

stdout:
['']
stderr:
zsh4 Regex quoted with single quotes

stdout:
true
stderr:
zsh5 Regex quoted with double quotes

stdout:
true
stderr:
zsh8 Double quoting pat variable -- again bash doesn't like it.

stdout:
true
stderr:
zsh10 Regex with == and not =~ is parse error, different lexer mode required

stdout:
stderr: 
zsh12 Malformed regex

stdout:
stderr: 
zsh: parse error near `)'
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 ]]
zsh14 Operators and space lose meaning inside ()

stdout:
stderr: 
zsh: parse error near `<'
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 ]]
zsh15 Regex with |

stdout:
stderr: 
zsh: parse error near `|'
zsh16 Regex to match literal brackets []

stdout:
true
stderr:
zsh: failed to compile regex: Unmatched [ or [^
zsh17 Regex to match literals . ^ $ etc.

stdout:
true
false
false
false
stderr:
zsh: failed to compile regex: Invalid preceding regular expression
zsh: failed to compile regex: Invalid preceding regular expression
zsh: failed to compile regex: Invalid preceding regular expression
zsh: failed to compile regex: Invalid preceding regular expression
bash18 Unquoted { is a regex parse error

stdout:
status=2
stderr:
zsh18 Unquoted { is a regex parse error

stdout:
status=1
stderr:
zsh: failed to compile regex: Invalid preceding regular expression
bash19 Fatal error inside [[ =~ ]]

stdout:
status=1
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/bash: line 1: 1 / 0 : division by 0 (error token is "0 ")
zsh20 Quoted {

stdout:
status=1
stderr:
zsh: failed to compile regex: Invalid preceding regular expression
zsh21 Escaped {

stdout:
stderr: 
zsh: failed to compile regex: Invalid preceding regular expression
zsh22 Escaped { stored in variable first

stdout:
['']
stderr: