Results for regex.test.sh

statusbashzshoshosh_ALT
pass 26132626
ok 0600
N-I 0400
BUG 2500
FAIL 0022
total28282828
casebashzshoshosh_ALTdescription
0pass N-I pass pass BASH_REMATCH
details
1pass pass pass pass Match is unanchored at both ends
2pass pass pass pass Failed match
3pass pass pass pass Regex quoted with \ -- preferred in bash
4pass ok pass pass Regex quoted with single quotes
details
5pass ok pass pass Regex quoted with double quotes
details
6pass pass pass pass Fix single quotes by storing in variable
7pass pass pass pass Fix single quotes by storing in variable
8pass ok pass pass Double quoting pat variable -- again bash doesn't like it.
details
9pass pass pass pass Mixing quoted and unquoted parts
10pass ok pass pass Regex with == and not =~ is parse error, different lexer mode required
details
11pass pass pass pass Omitting ( )
12pass ok pass pass Malformed regex
details
13pass pass FAIL FAIL Regex with char class containing space
detailsdetails
14pass N-I FAIL FAIL Operators and space lose meaning inside ()
detailsdetailsdetails
15pass N-I pass pass Regex with |
details
16pass ok pass pass Regex to match literal brackets []
details
17pass BUG pass pass Regex to match literals . ^ $ etc.
details
18BUG BUG pass pass Unquoted { is a regex parse error
detailsdetails
19BUG pass pass pass Fatal error inside [[ =~ ]]
details
20pass N-I pass pass Quoted { and +
details
21pass BUG pass pass Escaped {
details
22pass BUG pass pass Escaped { stored in variable first
details
23pass pass pass pass regex with ?
24pass pass pass pass regex with unprintable characters
25pass pass pass pass pattern $f(x) -- regression
26pass BUG pass pass pattern a=(1)
details
27pass pass pass pass pattern @f(x)
91 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 ]]
osh_ALT13 Regex with char class containing space

[osh_ALT stdout] Expected 'true\n', got ''
[osh_ALT 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 ]]
osh_ALT14 Operators and space lose meaning inside ()

[osh_ALT stdout] Expected 'true\n', got ''
[osh_ALT 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 { 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