Tcl Source Code

Check-in [459474d587]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Test independence in unixFCmd.test.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-5-branch
Files: files | file ages | folders
SHA1: 459474d5871504e6b37e3ff84d4a0539cd81627f
User & Date: dgp 2013-03-18 17:59:25
Context
2013-03-18
18:35
Test independence in fileSystem.test check-in: bebb15f295 user: dgp tags: core-8-5-branch
18:00
Test independence in unixFCmd.test check-in: 704a4f5023 user: dgp tags: trunk
17:59
Test independence in unixFCmd.test. check-in: 459474d587 user: dgp tags: core-8-5-branch
14:25
[Bug 3608360]: Test to make sure we never let [file exists] do globbing. check-in: 28f6af0a75 user: dkf tags: core-8-5-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tests/unixFCmd.test.

305
306
307
308
309
310
311
312
313


314
315


316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
    close [open foo.test w]
    list [catch {file attributes foo.test -permissions ---rwx} msg] $msg \
	    [file delete -force -- foo.test]
} {1 {unknown permission string format "---rwx"} {}}

close [open foo.test w]
set ::i 4
proc permcheck {testnum permstr expected} {
    test $testnum {SetPermissionsAttribute} {unix notRoot} {


	file attributes foo.test -permissions $permstr
	file attributes foo.test -permissions


    } $expected
}
permcheck unixFCmd-17.5   rwxrwxrwx	00777
permcheck unixFCmd-17.6   r--r---w-	00442
permcheck unixFCmd-17.7   0		00000
permcheck unixFCmd-17.8   u+rwx,g+r	00740
permcheck unixFCmd-17.9   u-w		00540
permcheck unixFCmd-17.10   o+rwx	00547
permcheck unixFCmd-17.11  --x--x--x	00111
permcheck unixFCmd-17.12  a+rwx		00777
file delete -force -- foo.test

test unixFCmd-18.1 {Unix pwd} {nonPortable unix notRoot} {
    # This test is nonportable because SunOS generates a weird error
    # message when the current directory isn't readable.
    set cd [pwd]
    set nd $cd/tstdir







|

>
>

|
>
>




|
<
<
<

|







305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324



325
326
327
328
329
330
331
332
333
    close [open foo.test w]
    list [catch {file attributes foo.test -permissions ---rwx} msg] $msg \
	    [file delete -force -- foo.test]
} {1 {unknown permission string format "---rwx"} {}}

close [open foo.test w]
set ::i 4
proc permcheck {testnum permList expected} {
    test $testnum {SetPermissionsAttribute} {unix notRoot} {
      set result {}
      foreach permstr $permList {
	file attributes foo.test -permissions $permstr
	lappend result [file attributes foo.test -permissions]
      }
      set result
    } $expected
}
permcheck unixFCmd-17.5   rwxrwxrwx	00777
permcheck unixFCmd-17.6   r--r---w-	00442
permcheck unixFCmd-17.7   {0 u+rwx,g+r u-w o+rwx} {00000 00740 00540 00547}



permcheck unixFCmd-17.11  --x--x--x	00111
permcheck unixFCmd-17.12  {0 a+rwx} {00000 00777}
file delete -force -- foo.test

test unixFCmd-18.1 {Unix pwd} {nonPortable unix notRoot} {
    # This test is nonportable because SunOS generates a weird error
    # message when the current directory isn't readable.
    set cd [pwd]
    set nd $cd/tstdir