Tcl Source Code

Check-in [bebb15f295]
Login

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

Overview
Comment:Test independence in fileSystem.test
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-5-branch
Files: files | file ages | folders
SHA1: bebb15f295ba6c65755f536bf949553b2bacd32d
User & Date: dgp 2013-03-18 18:35:09
Context
2013-03-19
10:06
[Bug 3606387]: Fix isolation of test scan-7.4. check-in: cf4f9480ee user: dkf tags: core-8-5-branch
2013-03-18
18:37
Test independence in fileSystem.test check-in: 5db36f952e user: dgp tags: trunk
18:35
Test independence in fileSystem.test check-in: bebb15f295 user: dgp tags: core-8-5-branch
17:59
Test independence in unixFCmd.test. check-in: 459474d587 user: dgp tags: core-8-5-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tests/fileSystem.test.

125
126
127
128
129
130
131
132


133
134
135
136


137
138

139
140
141
142
143
144
145
} {0}
test filesystem-1.9 {link normalisation} {unix hasLinks} {
    file delete -force dir.link
    file link dir.link [file nativename dir.dir]
    testPathEqual [file normalize [file join dir.dir linkinside.file foo]] \
	[file normalize [file join dir.link inside.file foo]]
} {1}
test filesystem-1.10 {link normalisation: double link} {unix hasLinks} {


    file link dir2.link dir.link
    testPathEqual [file normalize [file join dir.dir linkinside.file foo]] \
	[file normalize [file join dir2.link inside.file foo]]
} {1}


makeDirectory dir2.file
test filesystem-1.11 {link normalisation: double link, back in tree} {unix hasLinks} {

    file link [file join dir2.file dir2.link] [file join .. dir2.link]
    testPathEqual [file normalize [file join dir.dir linkinside.file foo]] \
	[file normalize [file join dir2.file dir2.link inside.file foo]]
} {1}
test filesystem-1.12 {file new native path} {} {
    for {set i 0} {$i < 10} {incr i} {
	foreach f [lsort [glob -nocomplain -type l *]] {







|
>
>



|
>
>


>







125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
} {0}
test filesystem-1.9 {link normalisation} {unix hasLinks} {
    file delete -force dir.link
    file link dir.link [file nativename dir.dir]
    testPathEqual [file normalize [file join dir.dir linkinside.file foo]] \
	[file normalize [file join dir.link inside.file foo]]
} {1}
test filesystem-1.10 {link normalisation: double link} -constraints {
    unix hasLinks
} -body {
    file link dir2.link dir.link
    testPathEqual [file normalize [file join dir.dir linkinside.file foo]] \
	[file normalize [file join dir2.link inside.file foo]]
} -cleanup {
    file delete dir2.link
} -result {1}
makeDirectory dir2.file
test filesystem-1.11 {link normalisation: double link, back in tree} {unix hasLinks} {
    file link dir2.link dir.link
    file link [file join dir2.file dir2.link] [file join .. dir2.link]
    testPathEqual [file normalize [file join dir.dir linkinside.file foo]] \
	[file normalize [file join dir2.file dir2.link inside.file foo]]
} {1}
test filesystem-1.12 {file new native path} {} {
    for {set i 0} {$i < 10} {incr i} {
	foreach f [lsort [glob -nocomplain -type l *]] {
500
501
502
503
504
505
506

507

508
509
510

511
512
513


514
515
516

517
518
519
520
521
522
523
524
525
526
527


528
529
530
531
532
533
534
535
536
537
   }
   # If we reach here we've succeeded. We used to crash above.
   expr 1
} {1}

# Make sure the testfilesystem hasn't been registered.
if {[testConstraint testfilesystem]} {

    while {![catch {testfilesystem 0}]} {}

}

test filesystem-3.0 {Tcl_FSRegister} testfilesystem {

    testfilesystem 1
} {registered}
test filesystem-3.1 {Tcl_FSUnregister} testfilesystem {


    testfilesystem 0
} {unregistered}
test filesystem-3.2 {Tcl_FSUnregister} testfilesystem {

    list [catch {testfilesystem 0} err] $err
} {1 failed}
test filesystem-3.3 {Tcl_FSRegister} testfilesystem {
    testfilesystem 1
    testfilesystem 1
    testfilesystem 0
    testfilesystem 0
} {unregistered}
test filesystem-3.4 {Tcl_FSRegister} testfilesystem {
    testfilesystem 1
    file system bar


} {reporting}
test filesystem-3.5 {Tcl_FSUnregister} testfilesystem {
    testfilesystem 0
    lindex [file system bar] 0
} {native}

test filesystem-4.0 {testfilesystem} {
    -constraints testfilesystem
    -match glob
    -body {







>

>



>



>
>



>








|


>
>
|

|







505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
   }
   # If we reach here we've succeeded. We used to crash above.
   expr 1
} {1}

# Make sure the testfilesystem hasn't been registered.
if {[testConstraint testfilesystem]} {
  proc resetfs {} {
    while {![catch {testfilesystem 0}]} {}
  }
}

test filesystem-3.0 {Tcl_FSRegister} testfilesystem {
    resetfs
    testfilesystem 1
} {registered}
test filesystem-3.1 {Tcl_FSUnregister} testfilesystem {
    resetfs
    testfilesystem 1
    testfilesystem 0
} {unregistered}
test filesystem-3.2 {Tcl_FSUnregister} testfilesystem {
    resetfs
    list [catch {testfilesystem 0} err] $err
} {1 failed}
test filesystem-3.3 {Tcl_FSRegister} testfilesystem {
    testfilesystem 1
    testfilesystem 1
    testfilesystem 0
    testfilesystem 0
} {unregistered}
test filesystem-3.4 {Tcl_FSRegister} -constraints testfilesystem -body {
    testfilesystem 1
    file system bar
} -cleanup {
    testfilesystem 0
} -result {reporting}
test filesystem-3.5 {Tcl_FSUnregister} testfilesystem {
    resetfs
    lindex [file system bar] 0
} {native}

test filesystem-4.0 {testfilesystem} {
    -constraints testfilesystem
    -match glob
    -body {