Results for ysh-string.test.sh

statusysh
pass 22
FAIL 4
total26
caseyshdescription
0pass Unquoted backslash escapes, as in J8 strings
1pass Unquoted \u{3bc} escape
2pass Unquoted \y24 escape
3pass single quoted -- implicit and explicit raw
4pass Implicit raw single quote with backslash is a syntax error
5pass $"foo $x" to make "foo $x" explicit
6pass single quoted C strings: $'foo\n'
7pass raw strings and J8 strings don't work in OSH
8pass J8-style u'' and b'' strings in expression mode
9pass J8-style u'' and b'' strings in command mode
10pass J8-style multi-line strings u''' b''' in command mode
11pass Double Quoted
12pass Multiline strings with '' and ""
13pass C strings in :| | array literals
14FAIL shopt parse_ysh_string
details
15pass Special rule for <<< ''' and <<< """ - no extra newline
16FAIL $''' isn't a a multiline string (removed)
details
17pass """ and $""" in Expression Mode
18pass ''' in Expression Mode
19pass """ and $""" in Command Mode
20FAIL ''' in Command Mode
details
21pass r''' in Command Mode, Expression mode
22pass ''' in Here Doc
23FAIL ''' without parse_triple_quote
details
24pass here doc with quotes
25pass triple quoted and implicit concatenation
22 passed, 0 OK, 0 not implemented, 0 BUG, 4 failed, 0 timeouts, 0 cases skipped
4 failed under osh

Details on runs that didn't PASS

ysh14 shopt parse_ysh_string

[ysh stdout] Expected '\\\nr\n\nend\nra\\\nraw\\\nr\\\nunset\nr\\\n', got '\\\nr\n\nend\n'
[ysh status] Expected 0, got 2

stdout:
\
r

end
stderr:
  echo ra'\'
         ^
[ stdin ]:5: Invalid quoted word part in YSH (OILS-ERR-17)
ysh16 $''' isn't a a multiline string (removed)

[ysh stdout] Expected '\n foo\n \n', got ''
[ysh status] Expected 0, got 2

stdout:
stderr: 
    '''
     ^
[ stdin ]:5: Invalid quoted word part in YSH (OILS-ERR-17)
ysh20 ''' in Command Mode

[ysh stdout] Expected "a\n--\ntwo = $two\n'\n'' '\n\\u{61}\n\n", got ''
[ysh status] Expected 0, got 2

stdout:
stderr: 
  echo ''a  # make sure lookahead doesn't mess up
       ^
[ stdin ]:1: Invalid quoted word part in YSH (OILS-ERR-17)
ysh23 ''' without parse_triple_quote

[ysh stdout] Expected '\n two = $two\n \\u{61}\n \n', got ''
[ysh status] Expected 0, got 2

stdout:
stderr: 
    '''
     ^
[ stdin ]:6: Invalid quoted word part in YSH (OILS-ERR-17)