os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/tests/unixFile.test
Update contrib.
1 # This file contains tests for the routines in the file tclUnixFile.c
3 # This file contains a collection of tests for one or more of the Tcl
4 # built-in commands. Sourcing this file into Tcl runs the tests and
5 # generates output for errors. No output means no errors were found.
7 # Copyright (c) 1998-1999 by Scriptics Corporation.
8 # Portions Copyright (c) 2007 Nokia Corporation and/or its subsidiaries. All rights reserved.
10 # See the file "license.terms" for information on usage and redistribution
11 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13 # RCS: @(#) $Id: unixFile.test,v 1.7 2002/07/05 10:38:43 dkf Exp $
15 if {[lsearch [namespace children] ::tcltest] == -1} {
16 package require tcltest
17 namespace import -force ::tcltest::*
20 if {[info commands testobj] == {}} {
21 puts "This application hasn't been compiled with the \"testfindexecutable\""
22 puts "command, so I can't test the Tcl_FindExecutable function"
23 ::tcltest::cleanupTests
28 cd [temporaryDirectory]
31 set oldPath $env(PATH)
32 file attributes [makeFile "" junk] -perm 0777
34 set absPath [file join [temporaryDirectory] junk]
36 test unixFile-1.1 {Tcl_FindExecutable} {unixOnly tempNotSymbian} {
38 testfindexecutable junk
40 test unixFile-1.1.1 {Tcl_FindExecutable} {symbianOnly} {
42 testfindexecutable tcltest.exe
43 } "Z:/sys/bin/tcltest.exe"
44 test unixFile-1.1.2 {Tcl_FindExecutable} {symbianOnly} {
45 set env(PATH) "Z:\\sys\\bin\\"
46 testfindexecutable tcltest.exe
47 } "Z:/sys/bin/tcltest.exe"
49 test unixFile-1.2 {Tcl_FindExecutable} {unixOnly tempNotSymbian} {
50 set env(PATH) "/dummy"
51 testfindexecutable junk
53 test unixFile-1.3 {Tcl_FindExecutable} {unixOnly tempNotSymbian} {
54 set env(PATH) "/dummy:[pwd]"
55 testfindexecutable junk
57 test unixFile-1.4 {Tcl_FindExecutable} {unixOnly tempNotSymbian} {
58 set env(PATH) "/dummy:"
59 testfindexecutable junk
61 test unixFile-1.5 {Tcl_FindExecutable} {unixOnly tempNotSymbian} {
62 set env(PATH) "/dummy:/dummy"
63 testfindexecutable junk
65 test unixFile-1.6 {Tcl_FindExecutable} {unixOnly tempNotSymbian} {
66 set env(PATH) "/dummy::/dummy"
67 testfindexecutable junk
69 test unixFile-1.7 {Tcl_FindExecutable} {unixOnly tempNotSymbian} {
70 set env(PATH) ":/dummy"
71 testfindexecutable junk
75 catch {set env(PATH) $oldPath}
78 ::tcltest::cleanupTests