Results for var-sub-quote.test.sh

statusoshosh_.pyosh_.cc
pass 393936
FAIL 003
total393939
caseoshosh_.pyosh_.ccdescription
0pass pass pass "${empty:-}"
1pass pass pass ${empty:-}
2pass pass pass array with empty values
3pass pass pass substitution of IFS character, quoted and unquoted
4pass pass pass :-
5pass pass pass -
6pass pass pass Inner single quotes
7pass pass pass Inner single quotes, outer double quotes
8pass pass pass Inner double quotes
9pass pass pass Inner double quotes, outer double quotes
10pass pass pass Multiple words: no quotes
11pass pass pass Multiple words: no outer quotes, inner single quotes
12pass pass pass Multiple words: no outer quotes, inner double quotes
13pass pass pass Multiple words: outer double quotes, no inner quotes
14pass pass pass Multiple words: outer double quotes, inner double quotes
15pass pass pass Multiple words: outer double quotes, inner single quotes
16pass pass pass Mixed inner quotes
17pass pass pass Mixed inner quotes with outer quotes
18pass pass pass part_value tree with multiple words
19pass pass pass part_value tree on RHS
20pass pass pass Var with multiple words: no quotes
21pass pass pass Multiple words: no outer quotes, inner single quotes
22pass pass pass Multiple words: no outer quotes, inner double quotes
23pass pass pass Multiple words: outer double quotes, no inner quotes
24pass pass pass Multiple words: outer double quotes, inner double quotes
25pass pass pass Multiple words: outer double quotes, inner single quotes
26pass pass pass No outer quotes, Multiple internal quotes
27pass pass pass Strip a string with single quotes, unquoted
28pass pass pass Strip a string with single quotes, double quoted
29pass pass pass The string to strip is space sensitive
30pass pass pass The string to strip can be single quoted, outer is unquoted
31pass pass pass Syntax error for single quote in double quote
32pass pass FAIL "${undef-'c d'}" and "${foo%'c d'}" are parsed differently
details
33pass pass pass $'' allowed within VarSub arguments
34pass pass pass # operator with single quoted arg (dash/ash and bash/mksh disagree, reported by Crestwave)
35pass pass FAIL / operator with single quoted arg (causes syntax error in regex in OSH, reported by Crestwave)
details
36pass pass FAIL single quotes work inside character classes
details
37pass pass pass comparison: :- operator with single quoted arg
38pass pass pass Right Brace as argument (similar to #702)
114 passed, 0 OK, 0 not implemented, 0 BUG, 3 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh_.cc32 "${undef-'c d'}" and "${foo%'c d'}" are parsed differently

[osh_.cc stdout] Expected '["\'c d\'", "\'c d\'"]\n[\'c d\', \'c d\']\n---\n[\'a b \', \'a b c d\']\n[\'a b zzz\', \'a b c d\']\n[\'a b zzz\', \'a b c d\']\n', got '["\'c d\'", "\'c d\'"]\n[\'c d\', \'c d\']\n[\'a b \', \'a b c d\']\n---\n'
[osh_.cc status] Expected 0, got 1

stdout:
["'c d'", "'c  d'"]
['c d', 'c  d']
['a b ', 'a b c d']
---
stderr:
  argv.py "${foo//'c d'/zzz}" "${foo//'c  d'/zzz}"
  ^~~~~~~
[ stdin ]:7: fatal: Error matching regex '(c d)': Invalid locale for LC_CTYPE

dumb_alloc:
	gNumNew = 2489
	gNumDelete = 260
	gMemPos = 81744

	gNumMalloc = 304
	gNumFree = 0
	gMemPos2 = 13360
osh_.cc35 / operator with single quoted arg (causes syntax error in regex in OSH, reported by Crestwave)

[osh_.cc stdout] Expected "no plus or minus ''''\nno plus or minus ''''\n", got ''
[osh_.cc status] Expected 0, got 1

stdout:
stderr: 
  echo no plus or minus "${var//[+-]}"
  ^~~~
[ stdin ]:2: fatal: Error matching regex '([+-])': Invalid locale for LC_CTYPE

dumb_alloc:
	gNumNew = 1897
	gNumDelete = 146
	gMemPos = 65152

	gNumMalloc = 133
	gNumFree = 0
	gMemPos2 = 10576
osh_.cc36 single quotes work inside character classes

[osh_.cc stdout] Expected 'a---b\n', got ''
[osh_.cc status] Expected 0, got 1

stdout:
stderr: 
  echo "${x//['[]']}"
  ^~~~
[ stdin ]:2: fatal: Error matching regex '([]\\[])': Invalid locale for LC_CTYPE

dumb_alloc:
	gNumNew = 1781
	gNumDelete = 129
	gMemPos = 61856

	gNumMalloc = 77
	gNumFree = 0
	gMemPos2 = 9664