diff options
| author | Philippe Altherr <philippe.altherr@gmail.com> | 2026-06-22 21:09:29 -0700 |
|---|---|---|
| committer | Bart Schaefer <schaefer@zsh.org> | 2026-06-22 21:29:59 -0700 |
| commit | 4d1193772b093e23c533e86cb11448d36f38c8c2 (patch) | |
| tree | c08230a0ccb57a973e6549871a86c4ae801ffe2f /Test | |
| parent | 54806: Null prompts in interactive tests to avoid unnecessary stderr (diff) | |
| download | zsh-4d1193772b093e23c533e86cb11448d36f38c8c2.tar zsh-4d1193772b093e23c533e86cb11448d36f38c8c2.tar.gz zsh-4d1193772b093e23c533e86cb11448d36f38c8c2.tar.bz2 zsh-4d1193772b093e23c533e86cb11448d36f38c8c2.tar.lz zsh-4d1193772b093e23c533e86cb11448d36f38c8c2.tar.xz zsh-4d1193772b093e23c533e86cb11448d36f38c8c2.tar.zst zsh-4d1193772b093e23c533e86cb11448d36f38c8c2.zip | |
54806: reformat interactive tests for readability (whitespace only)
Diffstat (limited to 'Test')
| -rw-r--r-- | Test/A02alias.ztst | 16 | ||||
| -rw-r--r-- | Test/D04parameter.ztst | 14 | ||||
| -rw-r--r-- | Test/K01nameref.ztst | 28 | ||||
| -rw-r--r-- | Test/W01history.ztst | 86 |
4 files changed, 75 insertions, 69 deletions
diff --git a/Test/A02alias.ztst b/Test/A02alias.ztst index 90f9e7c72..f866ab4d1 100644 --- a/Test/A02alias.ztst +++ b/Test/A02alias.ztst @@ -59,10 +59,11 @@ >And aliases are expanded PS1= $ZTST_testdir/../Src/zsh -fis <<<' - alias \{=echo - { begin - {end - fc -l -2' + alias \{=echo + { begin + {end + fc -l -2 + ' 0:Aliasing reserved tokens >begin >end @@ -70,9 +71,10 @@ *>*3*{end PS1= $ZTST_testdir/../Src/zsh -fis <<<' - alias -g S=\" - echo S a string S " - fc -l -1' + alias -g S=\" + echo S a string S " + fc -l -1 + ' 0:Global aliasing quotes > a string S *>*2*echo S a string S " diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst index 0ec890e72..13e38e824 100644 --- a/Test/D04parameter.ztst +++ b/Test/D04parameter.ztst @@ -148,13 +148,13 @@ ?(eval):2: null1: exiting2 PS1= PS2= $ZTST_testdir/../Src/zsh -fis <<<' - exec 2>&1 - foo() { - print ${1:?no arguments given} - print not reached - } - foo - print reached + exec 2>&1 + foo() { + print ${1:?no arguments given} + print not reached + } + foo + print reached ' 0:interactive shell returns to top level on ${...?...} error >foo:1: 1: no arguments given diff --git a/Test/K01nameref.ztst b/Test/K01nameref.ztst index fce31ae69..c0afaa827 100644 --- a/Test/K01nameref.ztst +++ b/Test/K01nameref.ztst @@ -1547,14 +1547,14 @@ F:previously this could create an infinite recursion and crash # Note bypassing TYPESET_TO_UNSET here PS1= PS2= $ZTST_testdir/../Src/zsh -fis <<<' - typeset -n p=PS3 - () { - typeset -p p - local p - typeset -p p - p=xx - typeset -p p - } + typeset -n p=PS3 + () { + typeset -p p + local p + typeset -p p + p=xx + typeset -p p + } ' 0:regression: assign to local that shadows global named reference >typeset -g -n p=PS3 @@ -1563,12 +1563,12 @@ F:previously this could create an infinite recursion and crash # Note bypassing TYPESET_TO_UNSET here PS1= PS2= $ZTST_testdir/../Src/zsh -fis <<<' - () { - typeset p=PS3 - typeset -n p - p=zz - } - typeset -p PS3 + () { + typeset p=PS3 + typeset -n p + p=zz + } + typeset -p PS3 ' 0:regression - converting a string into a named reference >typeset PS3=zz diff --git a/Test/W01history.ztst b/Test/W01history.ztst index 06a8556b9..665a37f2c 100644 --- a/Test/W01history.ztst +++ b/Test/W01history.ztst @@ -7,10 +7,10 @@ %test PS1= $ZTST_testdir/../Src/zsh -fis <<<' - print one two three four five six seven eight nine ten - print !:$ !:10 !:9 !:1 !:0 - print one two three four five six seven eight nine ten - print !:0-$ !:1-2 + print one two three four five six seven eight nine ten + print !:$ !:10 !:9 !:1 !:0 + print one two three four five six seven eight nine ten + print !:0-$ !:1-2 ' 0:History word references >one two three four five six seven eight nine ten @@ -19,12 +19,12 @@ >print one two three four five six seven eight nine ten one two PS1= $ZTST_testdir/../Src/zsh -fis <<<' - print line one of an arbitrary series - print issue two for some mystery sequence - print !-1:5-$ - print !1:2 - print !2:2 - print !-3:1-$ + print line one of an arbitrary series + print issue two for some mystery sequence + print !-1:5-$ + print !1:2 + print !2:2 + print !-3:1-$ ' 0:History line numbering >line one of an arbitrary series @@ -35,10 +35,10 @@ >mystery sequence PS1= $ZTST_testdir/../Src/zsh -fis <<<' - print All metaphor, Malachi, stilts and all - print !1:2:s/,/\\\\?/ !1:2:s/m/shm/:s/,/\!/ - print !1:2:& - print -l !1:2-3:gs/a/o/ + print All metaphor, Malachi, stilts and all + print !1:2:s/,/\\\\?/ !1:2:s/m/shm/:s/,/\!/ + print !1:2:& + print -l !1:2-3:gs/a/o/ ' 0:History substitution >All metaphor, Malachi, stilts and all @@ -48,9 +48,10 @@ >Molochi, PS1= $ZTST_testdir/../Src/zsh -fis <<<' - echo foo bar - echo $(!!) again - echo more $( !! )' + echo foo bar + echo $(!!) again + echo more $( !! ) + ' 0:Regression test for history references in command substitution >foo bar >foo bar again @@ -60,16 +61,17 @@ F:Check that a history bug introduced by workers/34160 is working again. # Discarded line of error output consumes prompts printed by "zsh -i". PS1= $ZTST_testdir/../Src/zsh -fis <<<' - echo /my/path/for/testing - echo !1:1:h10 - echo !1:1:h3 - echo !1:1:h2 - echo !1:1:h1 - echo !1:1:t10 - echo !1:1:t3 - echo !1:1:t2 - echo !1:1:t1 - echo !1:1:t3:h2' + echo /my/path/for/testing + echo !1:1:h10 + echo !1:1:h3 + echo !1:1:h2 + echo !1:1:h1 + echo !1:1:t10 + echo !1:1:t3 + echo !1:1:t2 + echo !1:1:t1 + echo !1:1:t3:h2 + ' 0:Modifiers :h and :t with arguments >/my/path/for/testing >/my/path/for/testing @@ -83,25 +85,27 @@ F:Check that a history bug introduced by workers/34160 is working again. >path/for PS1= $ZTST_testdir/../Src/zsh -fis <<<' - echo /my/path/for/testing - echo !1:1:P' + echo /my/path/for/testing + echo !1:1:P + ' 0:Modifier :P >/my/path/for/testing >/my/path/for/testing PS1= $ZTST_testdir/../Src/zsh -fgis <<<' - SAVEHIST=7 - print -rs "one\\" - print -rs "two\\\\" - print -rs "three\\\\\\" - print -rs "four\\\\\\\\" - print -rs "five\\\\\\\\\\" - print -s "while false\ndo\ntrue\\\\\n && break\ndone" - print -s "echo one\\\\\ntwo" - fc -W hist - fc -p -R hist - fc -l - rm hist' + SAVEHIST=7 + print -rs "one\\" + print -rs "two\\\\" + print -rs "three\\\\\\" + print -rs "four\\\\\\\\" + print -rs "five\\\\\\\\\\" + print -s "while false\ndo\ntrue\\\\\n && break\ndone" + print -s "echo one\\\\\ntwo" + fc -W hist + fc -p -R hist + fc -l + rm hist + ' 0:Lines ending in backslash saved and restored to history > 1 one\ > 2 two\\ |
