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
4ok pass pass pass pass Regex quoted with single quotes
details
5ok pass 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
8ok pass 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
detailsdetailsdetails
13pass N-I FAIL FAIL FAIL Operators lose meaning in () in regex state (BASH_REGEX_CAHRS)
detailsdetailsdetailsdetails
14pass N-I pass pass pass Regex with |
details
15pass N-I FAIL FAIL FAIL Double quoted regex gets regex-escaped
detailsdetailsdetailsdetails

62 passed, 5 ok, 4 known unimplemented, 0 known bugs, 3 failed, 0 skipped

Details on runs that didn't PASS

zsh0 BASH_REMATCH

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

stdout:
stderr: 
bash5 Regex quoted with double quotes

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

stdout:
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

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

stdout:
stderr: 
Line 2 of '<stdin>'
  [[ 'ba ba ' =~ ([a b]+) ]] && echo true
                 ^
Error parsing regex '([a': Un-matched bracket list operators.
osh_ALT12 Regex with char class

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

stdout:
stderr: 
Line 2 of '<stdin>'
  [[ 'ba ba ' =~ ([a b]+) ]] && echo true
                 ^
Error parsing regex '([a': Un-matched bracket list operators.
osh-byterun12 Regex with char class

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

stdout:
stderr: 
Line 2 of '<stdin>'
  [[ 'ba ba ' =~ ([a b]+) ]] && echo true
                 ^
Error parsing regex '([a': Un-matched bracket list operators.
zsh13 Operators lose meaning in () in regex state (BASH_REGEX_CAHRS)

stdout:
stderr: 
zsh: parse error near `<'
osh13 Operators lose meaning in () in regex state (BASH_REGEX_CAHRS)

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

stdout:
stderr: 
Line 2 of '<stdin>'
  [[ '< >' =~ (< >) ]] && echo true
              ^
Error parsing regex '(': Un-matched parenthesis group operators.
osh_ALT13 Operators lose meaning in () in regex state (BASH_REGEX_CAHRS)

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

stdout:
stderr: 
Line 2 of '<stdin>'
  [[ '< >' =~ (< >) ]] && echo true
              ^
Error parsing regex '(': Un-matched parenthesis group operators.
osh-byterun13 Operators lose meaning in () in regex state (BASH_REGEX_CAHRS)

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

stdout:
stderr: 
Line 2 of '<stdin>'
  [[ '< >' =~ (< >) ]] && echo true
              ^
Error parsing regex '(': Un-matched parenthesis group operators.
zsh14 Regex with |

stdout:
stderr: 
zsh: parse error near `|'
zsh15 Double quoted regex gets regex-escaped

stdout:
stderr: 
zsh: failed to compile regex: Invalid preceding regular expression
osh15 Double quoted regex gets regex-escaped

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

stdout:
stderr: 
Line 2 of '<stdin>'
  [[ { =~ "{" ]] && echo true
          ^
Error parsing regex '{': Invalid use of repetition operators such as using '*' as the first character.
osh_ALT15 Double quoted regex gets regex-escaped

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

stdout:
stderr: 
Line 2 of '<stdin>'
  [[ { =~ "{" ]] && echo true
          ^
Error parsing regex '{': Invalid use of repetition operators such as using '*' as the first character.
osh-byterun15 Double quoted regex gets regex-escaped

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

stdout:
stderr: 
Line 2 of '<stdin>'
  [[ { =~ "{" ]] && echo true
          ^
Error parsing regex '{': Invalid use of repetition operators such as using '*' as the first character.