spec test index / oilshell.org
case | bash | zsh | osh | osh_ALT | description |
0 | pass | pass | pass | pass | Match is unanchored at both ends |
1 | pass | pass | pass | pass | Failed match |
2 | pass | pass | pass | pass | Regex quoted with \ -- preferred in bash |
3 | ok | pass | pass | pass | Regex quoted with single quotes |
details | |||||
4 | ok | pass | pass | pass | Regex quoted with double quotes |
details | |||||
5 | pass | pass | pass | pass | Fix single quotes by storing in variable |
6 | pass | pass | pass | pass | Fix single quotes by storing in variable |
7 | ok | pass | pass | pass | Double quoting pat variable -- again bash doesn't like it. |
details | |||||
8 | pass | ok | pass | pass | Regex with == and not =~ is parse error, different lexer mode required |
details | |||||
9 | pass | pass | pass | pass | Omitting ( ) |
10 | pass | ok | pass | pass | Malformed regex |
details | |||||
11 | pass | pass | FAIL | FAIL | Regex with char class |
details | details | ||||
12 | pass | N-I | FAIL | FAIL | Operators lose meaning in () in regex state (BASH_REGEX_CAHRS) |
details | details | details | |||
13 | pass | N-I | pass | pass | Regex with | |
details | |||||
14 | pass | N-I | FAIL | FAIL | Double quoted regex gets regex-escaped |
details | details | details |
46 passed, 5 ok, 3 known unimplemented, 0 known bugs, 3 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 --- |
osh_ALT | 11 Regex with char class [osh_ALT stdout] Expected 'true\n', got '' [osh_ALT 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 --- |
osh_ALT | 12 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: 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 `|' |
zsh | 14 Double quoted regex gets regex-escaped stdout: stderr: zsh: failed to compile regex: Invalid preceding regular expression |
osh | 14 Double quoted regex gets regex-escaped [osh stdout] Expected 'true\n', got '' [osh status] Expected 0, got 2 stdout: stderr: Error compiling regex: Invalid use of repetition operators such as using '*' as the first character. Line 1 of '<stdin>' [[ { =~ "{" ]] && echo true ^ Invalid regex: '{' --- Line 1 of '<stdin>' [[ { =~ "{" ]] && echo true ^ Unexpected extra word (CompoundWord parts: [ (DoubleQuotedPart parts: [(LiteralPart token:(token id:Lit_Chars val:'{' span_id:7))] spids: [6 8] ) ] ) --- Line 1 of '<stdin>' [[ { =~ "{" ]] && echo true ^~ Error parsing [[ --- Line 0 of '<unknown>' <no position info for token> Error parsing AndOr in ParseCommandTerm --- |
osh_ALT | 14 Double quoted regex gets regex-escaped [osh_ALT stdout] Expected 'true\n', got '' [osh_ALT status] Expected 0, got 2 stdout: stderr: Error compiling regex: Invalid use of repetition operators such as using '*' as the first character. Line 1 of '<stdin>' [[ { =~ "{" ]] && echo true ^ Invalid regex: '{' --- Line 1 of '<stdin>' [[ { =~ "{" ]] && echo true ^ Unexpected extra word (CompoundWord parts: [ (DoubleQuotedPart parts: [(LiteralPart token:(token id:Lit_Chars val:'{' span_id:7))] spids: [6 8] ) ] ) --- Line 1 of '<stdin>' [[ { =~ "{" ]] && echo true ^~ Error parsing [[ --- Line 0 of '<unknown>' <no position info for token> Error parsing AndOr in ParseCommandTerm --- |