summaryrefslogtreecommitdiffstats
path: root/tests/unixFCmd.test
diff options
context:
space:
mode:
authorsurles <surles>1998-08-06 10:13:00 (GMT)
committersurles <surles>1998-08-06 10:13:00 (GMT)
commitffbaca9a6f6b29a18875738d3ffc3239adc9a844 (patch)
treea1663a3080eb73b086f2269104de6928995feb0e /tests/unixFCmd.test
parent8a2c0761a168dbd14d60c1909034aecb9a3562dd (diff)
downloadtcl-ffbaca9a6f6b29a18875738d3ffc3239adc9a844.zip
tcl-ffbaca9a6f6b29a18875738d3ffc3239adc9a844.tar.gz
tcl-ffbaca9a6f6b29a18875738d3ffc3239adc9a844.tar.bz2
Changed the alarm test
Diffstat (limited to 'tests/unixFCmd.test')
-rw-r--r--tests/unixFCmd.test26
1 files changed, 19 insertions, 7 deletions
diff --git a/tests/unixFCmd.test b/tests/unixFCmd.test
index 41b9bc7..e8f997d 100644
--- a/tests/unixFCmd.test
+++ b/tests/unixFCmd.test
@@ -92,13 +92,25 @@ test unixFCmd-1.7 {TclpRenameFile: EXDEV} {
set result
} {1}
test unixFCmd-1.8 {Checking EINTR Bug} {
- global gotsig
- set gotsig 0
- testalarm {set gotsig 1}
- for {set i 0} {$i < 500000} {incr i} {}
- return $gotsig
-} {1}
-catch {unset gotsig}
+ testalarm
+ after 2000
+ list [testgotsig] [testgotsig]
+} {1 0}
+test unixFCmd-1.9 {Checking EINTR Bug} {
+ cleanup
+ set f [open tfalarm w]
+ puts $f {
+ after 2000
+ puts "hello world"
+ exit 0
+ }
+ close $f
+ testalarm
+ set pipe [open "|[info nameofexecutable] tfalarm" r+]
+ set line [read $pipe 1]
+ catch {close $pipe}
+ list $line [testgotsig]
+} {h 1}
test unixFCmd-2.1 {TclpCopyFile: target exists: lstat(dst) == 0} {
cleanup
exec touch tf1