Results for regex.test.sh

casebashzshoshosh_ALTosh-byterundescription
0pass N-I pass pass pass BASH_REMATCH
details
1pass pass pass pass pass Match is unanchored at both ends
2pass pass pass pass pass Failed match
3pass pass pass pass pass Regex quoted with \ -- preferred in bash
4pass ok pass pass pass Regex quoted with single quotes
details
5pass ok pass pass pass Regex quoted with double quotes
details
6pass pass pass pass pass Fix single quotes by storing in variable
7pass pass pass pass pass Fix single quotes by storing in variable
8pass ok pass pass pass Double quoting pat variable -- again bash doesn't like it.
details
9pass ok pass pass pass Regex with == and not =~ is parse error, different lexer mode required
details
10pass pass pass pass pass Omitting ( )
11pass ok pass pass pass Malformed regex
details
12pass pass FAIL FAIL FAIL Regex with char class containing space
detailsdetailsdetails
13pass N-I FAIL FAIL FAIL Operators and space lose meaning inside ()
detailsdetailsdetailsdetails
14pass N-I pass pass pass Regex with |
details
15pass N-I FAIL FAIL FAIL Unquoted { is parse error in bash/zsh
detailsdetailsdetailsdetails
16pass N-I pass pass pass Quoted {
details
17pass BUG pass pass pass Escaped {
details
18pass BUG pass pass pass Escaped { stored in variable first
details
19pass pass pass pass pass regex with ?

79 passed, 5 ok, 5 known unimplemented, 2 known bugs, 3 failed, 0 skipped

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:
zsh9 Regex with == and not =~ is parse error, different lexer mode required

stdout:
stderr: 
zsh11 Malformed regex

stdout:
stderr: 
zsh: parse error near `)'
osh12 Regex with char class containing space

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

stdout:
stderr: 
Line 1 of '<stdin>'
  [[ 'ba ba ' =~ ([a b]+) ]] && echo true
                     ^
Expected ]]
osh_ALT12 Regex with char class containing space

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

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

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

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

stdout:
stderr: 
zsh: parse error near `<'
osh13 Operators and space lose meaning inside ()

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

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

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

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

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

stdout:
stderr: 
Line 1 of '<stdin>'
  [[ '< >' =~ (< >) ]] && echo true
                 ^
Expected ]]
zsh14 Regex with |

stdout:
stderr: 
zsh: parse error near `|'
zsh15 Unquoted { is parse error in bash/zsh

stdout:
status=1
stderr:
zsh: failed to compile regex: Invalid preceding regular expression
osh15 Unquoted { is parse error in bash/zsh

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

stdout:
stderr: 
Line 1 of '<stdin>'
  [[ { =~ { ]] && echo true
          ^
Invalid regex '{'
osh_ALT15 Unquoted { is parse error in bash/zsh

[osh_ALT stdout] Expected 'status=2\n', got ''
[osh_ALT status] Expected 0, got 2

stdout:
stderr: 
Line 1 of '<stdin>'
  [[ { =~ { ]] && echo true
          ^
Invalid regex '{'
osh-byterun15 Unquoted { is parse error in bash/zsh

[osh-byterun stdout] Expected 'status=2\n', got ''
[osh-byterun status] Expected 0, got 2

stdout:
stderr: 
Line 1 of '<stdin>'
  [[ { =~ { ]] && echo true
          ^
Invalid regex '{'
zsh16 Quoted {

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

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

stdout:
['']
stderr: