| | @@ -0,0 +1,66 @@ |
| 1 | +#
|
| 2 | +# Copyright (c) 2016 D. Richard Hipp
|
| 3 | +#
|
| 4 | +# This program is free software; you can redistribute it and/or
|
| 5 | +# modify it under the terms of the Simplified BSD License (also
|
| 6 | +# known as the "2-Clause License" or "FreeBSD License".)
|
| 7 | +#
|
| 8 | +# This program is distributed in the hope that it will be useful,
|
| 9 | +# but without any warranty; without even the implied warranty of
|
| 10 | +# merchantability or fitness for a particular purpose.
|
| 11 | +#
|
| 12 | +# Author contact information:
|
| 13 | +# [email protected]
|
| 14 | +# http://www.hwaci.com/drh/
|
| 15 | +#
|
| 16 | +############################################################################
|
| 17 | +#
|
| 18 | +# Symbolic link tests.
|
| 19 | +#
|
| 20 | +
|
| 21 | +if {$tcl_platform(platform) eq "windows"allow
|
| 22 | +puts $RESULTmlinks are not supported on Windows."
|
| 23 | + test_cleanup_then_returnon
|
| 24 | +
|
| 25 | +fossil test-th-eval --open-con"setting allow-symlinks"
|
| 26 | +
|
| 27 | +itory [normalize_result]
|
| 28 | +
|
| 29 | +if {[string length $repository] == 0} {
|
| 30 | + puts "Detection of the open repository file failed."
|
| 31 | + test_cleanup_then_return
|
| 32 | +}
|
| 33 | +
|
| 34 | +#######################################
|
| 35 | +# Use symbolic link to a directory... #
|
| 36 | +##############fossil commit -m "c1"_then_returnon
|
| 37 | +
|
| 38 | +fossil test-th-eval --open-con"setting allow-symlinks"
|
| 39 | +
|
| 40 | +itory [normalize_rght (c) 2016 D. Rich#
|
| 41 | +# Copyright up_then_returnon
|
| 42 | +
|
| 43 | +fossil test-th-eval --open-con"setting allow-symlinks"
|
| 44 | +
|
| 45 | +itory [normalize_result]
|
| 46 | +
|
| 47 | +if {[string length $repository] == 0} {
|
| 48 | + puts "Detection of the open repository file failed."
|
| 49 | + test_cleanup_then_return
|
| 50 | +}
|
| 51 | +
|
| 52 | +#######################################
|
| 53 | +# Use symbolic link to a directory... #
|
| 54 | +#######################################
|
| 55 | +
|
| 56 | +file mkdir [file join $rootDir subdirA]
|
| 57 | +exec ln -s [file join $rootDir subdirA] symdirA
|
| 58 | +
|
| 59 | +###############################################################################
|
| 60 | +
|
| 61 | +write_file [file join $rootDir subdirA f1.txt] "f1"
|
| 62 | +write_file [file join $rootDir subdirA f2.txt] "f2"
|
| 63 | +
|
| 64 | +test symlinks-dir-1 {[file exists [file join $rootDir subdirA f1.txt]] eq 1}
|
| 65 | +test symlinks-dir-2 {[file exists [file join $rootDir symdirA f1.txt]] eq 1}
|
| 66 | +test symlinks-di |