Results for regex.test.sh

statusbashzshosh
pass 351637
ok 070
N-I 050
BUG 290
total373737
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 N-I pass Regex with |
details
14pass ok pass Regex to match literal brackets []
details
15pass BUG pass Regex to match literals . ^ $ etc.
details
16BUG BUG pass Unquoted { is a regex parse error
detailsdetails
17BUG pass pass Fatal error inside [[ =~ ]]
details
18pass N-I pass Quoted { and +
details
19pass BUG pass Escaped {
details
20pass BUG pass Escaped { stored in variable first
details
21pass pass pass regex with ?
22pass pass pass regex with unprintable characters
23pass pass pass pattern $f(x) -- regression
24pass BUG pass pattern a=(1)
details
25pass pass pass pattern @f(x)
26pass pass pass Bug: Nix idiom with closing ) next to pattern
27pass pass pass unquoted (a b) as pattern, (a b|c)
28pass BUG pass Multiple adjacent () groups
details
29pass ok pass unquoted [a b] as pattern, [a b|c]
details
30pass N-I pass c|a unquoted
details
31pass BUG pass Operator chars ; & but not |
details
32pass pass pass Quotes '' "" $'' $"" in pattern
33pass pass pass Unicode in pattern
34pass BUG pass Parse error with 2 words
details
35pass BUG pass make a lisp example
details
36pass N-I pass Operators and space lose meaning inside ()
details
88 passed, 7 OK, 5 not implemented, 11 BUG, 0 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

zsh0 BASH_REMATCH

stdout:
status=0
['']
status=1
['']
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 `)'
zsh13 Regex with |

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

stdout:
true
stderr:
zsh: failed to compile regex: Unmatched [, [^, [:, [., or [=
zsh15 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
bash16 Unquoted { is a regex parse error

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

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

stdout:
status=1
stderr:
bash-4.4: line 1: 1 / 0 : division by 0 (error token is "0 ")
zsh18 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
zsh19 Escaped {

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

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

stdout:
status=0
stderr:
zsh: x not found
zsh28 Multiple adjacent () groups

stdout:
['']
['']
['']
['']
stderr:
zsh: parse error near `>>'
zsh: parse error near `fi'
zsh: parse error near `>>'
zsh: parse error near `fi'
zsh: parse error near `()'
zsh: parse error near `fi'
zsh: parse error near `()'
zsh: parse error near `fi'
zsh29 unquoted [a b] as pattern, [a b|c]

stdout:
yes
[ab]=0
[a b]=1
yes
[a b]=0
stderr:
zsh: condition expected: a
zsh30 c|a unquoted

stdout:
one
stderr:
zsh: parse error near `|'
zsh: parse error near `fi'
zsh31 Operator chars ; & but not |

stdout:
semi=1
semi paren=1

amp=1
pipe=1
pipe=1
angle=1
newline=1
stderr:
zsh: parse error: condition expected: ';'
zsh: parse error near `)'
zsh: parse error: condition expected: '&'
zsh: parse error: condition expected: '|'
zsh: parse error: condition expected: 'a'
zsh: parse error near `|'
zsh: parse error: condition expected: '<>'
zsh: parse error near `b'
zsh34 Parse error with 2 words

stdout:
one
stderr:
zsh: condition expected: a
zsh: parse error near `fi'
zsh35 make a lisp example

stdout:
status=1
m=
stderr:
zsh: parse error near `|'
zsh36 Operators and space lose meaning inside ()

stdout:
stderr: 
zsh: parse error near `<'