From 0363f29282f4dd75475d4ad004dae035871d0757 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Sat, 10 Jul 2004 21:02:28 +0000 Subject: Added code to restore env(LC_TIME) after the test completes, silencing a warning from 'make TESTFLAGS="-debug 1" test'. --- ChangeLog | 2 ++ tests/clock.test | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f8ce13c..2513147 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,8 @@ * tests/clock.test (clock-2.11): Changed the test so that it isn't an infinite loop when run under valgrind on a slow virtual machine. Thanks to Miguel Sofer for the bug report. + Also put in code to restore env(LC_TIME) after tests complete, + silencing a warning from 'make TESTFLAGS="-debug 1" test'. 2004-07-08 Miguel Sofer diff --git a/tests/clock.test b/tests/clock.test index 9f6921e..f4f8c39 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -10,8 +10,11 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.test,v 1.32 2004/07/10 20:38:44 kennykb Exp $ +# RCS: @(#) $Id: clock.test,v 1.33 2004/07/10 21:02:28 kennykb Exp $ +if { [info exists env(LC_TIME)] } { + set oldlctime $env(LC_TIME) +} set env(LC_TIME) POSIX if {[lsearch [namespace children] ::tcltest] == -1} { @@ -702,6 +705,12 @@ test clock-11.2 {scan of time alone in GMT assumes correct date} { clock scan "1600" -gmt true -base $base } 1078848000 +if { [info exists oldlctime] } { + set env(LC_TIME) $oldlctime +} else { + unset env(LC_TIME) +} + # cleanup ::tcltest::cleanupTests return -- cgit v0.12