case | bash | zsh | osh | description |
0 | pass | pass | pass | Match is unanchored at both ends |
1 | pass | pass | pass | Failed match |
2 | pass | pass | pass | Regex quoted with \ -- preferred in bash |
3 | ok | pass | pass | Regex quoted with single quotes |
details | ||||
4 | ok | pass | pass | Regex quoted with double quotes |
details | ||||
5 | pass | pass | pass | Fix single quotes by storing in variable |
6 | pass | pass | pass | Fix single quotes by storing in variable |
7 | ok | pass | pass | Double quoting pat variable -- again bash doesn't like it. |
details | ||||
8 | pass | ok | pass | Regex with == and not =~ is parse error, different lexer mode required |
details | ||||
9 | pass | pass | pass | Omitting ( ) |
10 | pass | ok | pass | Malformed regex |
details | ||||
11 | pass | pass | FAIL | Regex with char class |
details | ||||
12 | pass | N-I | FAIL | Operators lose meaning in () in regex state (BASH_REGEX_CAHRS) |
details | details | |||
13 | pass | N-I | pass | Regex with | |
details |
33 passed, 5 ok, 2 known unimplemented, 0 known bugs, 2 failed, 0 skipped
bash | 3 Regex quoted with single quotes stdout: stderr: |
bash | 4 Regex quoted with double quotes stdout: stderr: |
bash | 7 Double quoting pat variable -- again bash doesn't like it. stdout: stderr: |
zsh | 8 Regex with == and not =~ is parse error, different lexer mode required stdout: stderr: |
zsh | 10 Malformed regex stdout: stderr: zsh: parse error near `)' |
osh | 11 Regex with char class [osh stdout] Expected 'true\n', got '' [osh status] Expected 0, got 2 stdout: stderr: Error compiling regex: Un-matched bracket list operators. Line 1 of '<stdin>' [[ 'ba ba ' =~ ([a b]+) ]] && echo true ^ Invalid regex: '([a' --- Line 1 of '<stdin>' [[ 'ba ba ' =~ ([a b]+) ]] && echo true ^ Unexpected extra word (CompoundWord parts: [ (LiteralPart token:(token id:Lit_Chars val:"(" span_id:8)) (LiteralPart token:(token id:Lit_Other val:"[" span_id:9)) (LiteralPart token:(token id:Lit_Chars val:a span_id:10)) ] ) --- Line 1 of '<stdin>' [[ 'ba ba ' =~ ([a b]+) ]] && echo true ^~ Error parsing [[ --- Line 0 of '<unknown>' <no position info for token> Error parsing AndOr in ParseCommandTerm --- |
zsh | 12 Operators lose meaning in () in regex state (BASH_REGEX_CAHRS) stdout: stderr: zsh: parse error near `<' |
osh | 12 Operators lose meaning in () in regex state (BASH_REGEX_CAHRS) [osh stdout] Expected 'true\n', got '' [osh status] Expected 0, got 2 stdout: stderr: Error compiling regex: Un-matched parenthesis group operators. Line 1 of '<stdin>' [[ '< >' =~ (< >) ]] && echo true ^ Invalid regex: '(' --- Line 1 of '<stdin>' [[ '< >' =~ (< >) ]] && echo true ^ Unexpected extra word (CompoundWord parts:[(LiteralPart token:(token id:Lit_Chars val:"(" span_id:8))]) --- Line 1 of '<stdin>' [[ '< >' =~ (< >) ]] && echo true ^~ Error parsing [[ --- Line 0 of '<unknown>' <no position info for token> Error parsing AndOr in ParseCommandTerm --- |
zsh | 13 Regex with | stdout: stderr: zsh: parse error near `|' |