[PATCH 2/4] [cmd] Prevent external env vars causing tests to fail

Ann and Jason Edmeades jason at edmeades.me.uk
Mon Nov 19 15:03:09 CST 2012


Existance of external environment variables should not cause
make test to fail, but it can cause extra lines in some of the
set commands if the test does not first clear them out.

[Fixes bug 32087]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20121119/263f6031/attachment.html>
-------------- next part --------------
From 59d13471ff781ffc55bb77f9cdecdf4f2487af4c Mon Sep 17 00:00:00 2001
From: Jason Edmeades <jason at edmeades.me.uk>
Date: Thu, 8 Nov 2012 22:06:21 +0000
Subject: [PATCH 2/4] [cmd] Prevent external env vars causing tests to fail

Existance of external environment variables should not cause
make test to fail, but it can cause extra lines in some of the
set commands if the test does not first clear them out.

[Fixes bug 32087]
---
 programs/cmd/tests/test_builtins.cmd |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd
index a1a3c4a..3efcd2a 100644
--- a/programs/cmd/tests/test_builtins.cmd
+++ b/programs/cmd/tests/test_builtins.cmd
@@ -239,6 +239,9 @@ set FOO=
 
 echo ------------ Testing 'set' ------------
 call :setError 0
+rem Remove any FOO* BA* environment variables from shell before proceeding
+for /f "delims==" %%i in ('set ba') do set %%i=
+for /f "delims==" %%i in ('set foo') do set %%i=
 set FOOBAR 2> nul > nul
 echo %ErrorLevel%
 set FOOBAR =  baz
-- 
1.7.9.5


More information about the wine-patches mailing list