[PATCH 2/2] cmd/tests: Trigger crash for regression described in bug #48738.

Bernhard Übelacker bernhardu at mailbox.org
Mon Apr 27 07:04:41 CDT 2020


Just to demonstrate the crash without the previous patch.
Should it be included in the test suite?

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 at mailbox.org>
---
 programs/cmd/tests/test_builtins.cmd     | 5 +++++
 programs/cmd/tests/test_builtins.cmd.exp | 1 +
 2 files changed, 6 insertions(+)

diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd
index 4bf37a35bb8..118576ebac8 100644
--- a/programs/cmd/tests/test_builtins.cmd
+++ b/programs/cmd/tests/test_builtins.cmd
@@ -1013,6 +1013,11 @@ if /i not (a)==(b) (
 ) else (
   echo comparison operators surrounded by brackets seem to be broken
 )
+echo --- checking for regression described in bug #48738, not output, just expected not to crash
+if not defined windir echo not-defined
+if not exist %windir% (
+  rem
+)
 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..3dd7c344443 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -699,6 +699,7 @@ 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
+--- checking for regression described in bug #48738, not output, just expected not to crash
 --- case sensitivity with and without /i option
 if seems to default to case sensitivity
 if /i seems to work
-- 
2.20.1




More information about the wine-devel mailing list