This demonstrates a possible crash caused by a regression, that should be fixed by patch [1/2].
v2: Instead of just triggering the crash, check the expected results for that sequence of commands.
Previous version: https://www.winehq.org/pipermail/wine-devel/2020-April/165342.html
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47770 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48738 Signed-off-by: Bernhard Übelacker bernhardu@mailbox.org --- programs/cmd/tests/test_builtins.cmd | 7 +++++++ programs/cmd/tests/test_builtins.cmd.exp | 2 ++ 2 files changed, 9 insertions(+)
diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd index 4bf37a35bb8..73b0917c275 100644 --- a/programs/cmd/tests/test_builtins.cmd +++ b/programs/cmd/tests/test_builtins.cmd @@ -1013,6 +1013,13 @@ if /i not (a)==(b) ( ) else ( echo comparison operators surrounded by brackets seem to be broken ) +if defined windir echo windir is defined +if not defined windir echo windir is defined +if not exist %windir% ( + echo windir does not exist +) else ( + echo windir does exist +) echo --- case sensitivity with and without /i option if bar==BAR echo if does not default to case sensitivity if not bar==BAR echo if seems to default to case sensitivity diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index 5bcd29b917c..fb84de2f5d5 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -699,6 +699,8 @@ comparison operators surrounded by brackets seem to work comparison operators surrounded by brackets seem to work comparison operators surrounded by brackets seem to work comparison operators surrounded by brackets seem to work +windir is defined +windir does exist --- case sensitivity with and without /i option if seems to default to case sensitivity if /i seems to work