Skip to content

Commit 68199e4

Browse files
committed
Add test case.
1 parent 8145cfe commit 68199e4

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

tests/02-core/04-misc/03-set-array-from-vals/expect.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,22 @@ Length: 2
439439

440440
- - - - - - - - - -
441441

442+
## `--quiet` and one invalid value
443+
444+
### stdout
445+
```
446+
Length: 4
447+
448+
0: <never set>
449+
1: x
450+
2: y
451+
3: z
452+
```
453+
454+
### exit: 1
455+
456+
- - - - - - - - - -
457+
442458
## unquoted $'\'' (invalid)
443459

444460
### stdout

tests/02-core/04-misc/03-set-array-from-vals/run

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ call-and-log-as-test 'two return-surrounded values' \
113113
call-and-log-as-test 'two values surrounded by a mix of all valid separators' \
114114
call-safv var $'\n\r \tflorp\r \t\nfleep\t\r\n '
115115

116+
# Invalid value, but with `--quiet`.
117+
call-and-log-as-test '`--quiet` and one invalid value' \
118+
call-safv --quiet var 'boop&'
119+
116120
# Invalid calls because of unquoted special characters.
117121
chars=$'\'\\";&|$?!*`#%^,~[]{}()<>'
118122
for (( n = 0; n < ${#chars}; n++ )); do

0 commit comments

Comments
 (0)