Results for regex.test.sh

statusbashzshosh
pass 261326
ok 060
N-I 040
BUG 250
FAIL 002
total282828
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 { and +
details
21pass BUG pass Escaped {
details
22pass BUG pass Escaped { stored in variable first
details
23pass pass pass regex with ?
24pass pass pass regex with unprintable characters
25pass pass pass pattern $f(x) -- regression
26pass BUG pass pattern a=(1)
details
27pass pass pass pattern @f(x)
65 passed, 6 OK, 4 not implemented, 7 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:
bash: line 1: 1 / 0 : division by 0 (error token is "0 ")
zsh20 Quoted { and +

stdout:
yes ^
yes $
yes )
yes |
---
yes .
---
a 0
- 1
b 0
z 0
status=0
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
zsh: failed to compile regex: Unmatched ( or \(
zsh: failed to compile regex: Trailing backslash
zsh21 Escaped {

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

stdout:
['']
stderr:
zsh26 pattern a=(1)

stdout:
status=0
stderr:
zsh: x not found