Fossil

Check-in [596bbe34]
Login

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

Overview
Comment:Further test refinements.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dirSymlinks
Files: files | file ages | folders
SHA1:596bbe342124b8275c99da4974d91b09ef9078d5
User & Date: mistachkin 2016-10-03 21:27:06
Context
2016-10-03
21:30
Merge updates from trunk. Closed-Leaf check-in: be316701 user: mistachkin tags: dirSymlinks
21:27
Further test refinements. check-in: 596bbe34 user: mistachkin tags: dirSymlinks
21:12
Test refinement. check-in: 0751dbe2 user: mistachkin tags: dirSymlinks
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/symlinks.test.

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40





41
42
43
44
45
46
47
..
63
64
65
66
67
68
69
70

71
72
73
74
75
76
77
#

if {$tcl_platform(platform) eq "windows"} {
  puts "Symlinks are not supported on Windows."
  test_cleanup_then_return
}

fossil test-th-eval "setting allow-symlinks"

if {![string is true -strict [normalize_result]]} {
  puts "Symlinks are not enabled."
  test_cleanup_then_return
}

require_no_open_checkout

###############################################################################

test_setup; set rootDir [file normalize [pwd]]

fossil test-th-eval {repository}
set repository [normalize_result]






#######################################
# Use symbolic link to a directory... #
#######################################

file mkdir [file join $rootDir subdirA]
exec ln -s [file join $rootDir subdirA] symdirA
................................................................................

fossil ls
test symlinks-dir-5 {[normalize_result] eq "symdirA/f1.txt"}

###############################################################################

fossil extras
test symlinks-dir-6 {[normalize_result] eq "symdirA/f2.txt"}


###############################################################################

fossil close
file delete [file join $rootDir subdirA f1.txt]

test symlinks-dir-7 {[file exists [file join $rootDir subdirA f1.txt]] eq 0}







|












|

>
>
>
>
>







 







|
>







19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
..
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#

if {$tcl_platform(platform) eq "windows"} {
  puts "Symlinks are not supported on Windows."
  test_cleanup_then_return
}

fossil test-th-eval --open-config "setting allow-symlinks"

if {![string is true -strict [normalize_result]]} {
  puts "Symlinks are not enabled."
  test_cleanup_then_return
}

require_no_open_checkout

###############################################################################

test_setup; set rootDir [file normalize [pwd]]

fossil test-th-eval --open-config {repository}
set repository [normalize_result]

if {[string length $repository] == 0} {
  puts "Detection of the open repository file failed."
  test_cleanup_then_return
}

#######################################
# Use symbolic link to a directory... #
#######################################

file mkdir [file join $rootDir subdirA]
exec ln -s [file join $rootDir subdirA] symdirA
................................................................................

fossil ls
test symlinks-dir-5 {[normalize_result] eq "symdirA/f1.txt"}

###############################################################################

fossil extras
test symlinks-dir-6 {[normalize_result] eq \
"subdirA/f1.txt\nsubdirA/f2.txt\nsymdirA/f2.txt"}

###############################################################################

fossil close
file delete [file join $rootDir subdirA f1.txt]

test symlinks-dir-7 {[file exists [file join $rootDir subdirA f1.txt]] eq 0}