Fossil SCM
Initial draft of new tests to cover the directory symlink fixes.
Commit
7cefd41a36687c9a8ba6682a6f1b9187f53cff21
Parent
3e4eba78f0d5792…
1 file changed
+53
+53
| --- a/test/symlinks.test | ||
| +++ b/test/symlinks.test | ||
| @@ -0,0 +1,53 @@ | ||
| 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_thensil test-th-eval --open-con"setting allow-symlinks" | |
| 24 | + | |
| 25 | +itory [normalize_result] | |
| 26 | + | |
| 27 | +if {[string length $repository] == 0} { | |
| 28 | + puts "Detection of the open repository file failed." | |
| 29 | + test_cleanup_then_return | |
| 30 | +} | |
| 31 | + | |
| 32 | +####################################### | |
| 33 | +# Use symbolic link to a directory... # | |
| 34 | +#######en-con"setting al## | |
| 35 | + | |
| 36 | +write_file [file1 {[file readlink]] eq \ | |
| 37 | +test-th-eval --open-cubdirA]}rootDir subdirA f2.txt]] eq 1} | |
| 38 | +######### | |
| 39 | + | |
| 40 | +filt]] eq 1} | |
| 41 | +exec ln -s [fi4ize_result] | |
| 42 | + | |
| 43 | +if {[string length $repository] == 0} { | |
| 44 | + puts "Detection of the5_cleanup_then_return | |
| 45 | +} | |
| 46 | + | |
| 47 | +####################################### | |
| 48 | +# Use symbolle exists [file join $rootDir subdirA f1.txt]] eq 1} | |
| 49 | +test symlinks-dir-2 {[file exists [file join $rootDir symdirA f1.txt]] eq 1} | |
| 50 | +test symlinks-di"# | |
| 51 | +# Copyright (c) 2016 D. Richard Hipp | |
| 52 | +# | |
| 53 | +# This program is free software; |
| --- a/test/symlinks.test | |
| +++ b/test/symlinks.test | |
| @@ -0,0 +1,53 @@ | |
| --- a/test/symlinks.test | |
| +++ b/test/symlinks.test | |
| @@ -0,0 +1,53 @@ | |
| 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_thensil test-th-eval --open-con"setting allow-symlinks" |
| 24 | |
| 25 | itory [normalize_result] |
| 26 | |
| 27 | if {[string length $repository] == 0} { |
| 28 | puts "Detection of the open repository file failed." |
| 29 | test_cleanup_then_return |
| 30 | } |
| 31 | |
| 32 | ####################################### |
| 33 | # Use symbolic link to a directory... # |
| 34 | #######en-con"setting al## |
| 35 | |
| 36 | write_file [file1 {[file readlink]] eq \ |
| 37 | test-th-eval --open-cubdirA]}rootDir subdirA f2.txt]] eq 1} |
| 38 | ######### |
| 39 | |
| 40 | filt]] eq 1} |
| 41 | exec ln -s [fi4ize_result] |
| 42 | |
| 43 | if {[string length $repository] == 0} { |
| 44 | puts "Detection of the5_cleanup_then_return |
| 45 | } |
| 46 | |
| 47 | ####################################### |
| 48 | # Use symbolle exists [file join $rootDir subdirA f1.txt]] eq 1} |
| 49 | test symlinks-dir-2 {[file exists [file join $rootDir symdirA f1.txt]] eq 1} |
| 50 | test symlinks-di"# |
| 51 | # Copyright (c) 2016 D. Richard Hipp |
| 52 | # |
| 53 | # This program is free software; |