Fossil SCM
Fixes to the 'th1' test to account for a trace output difference on non-Windows platforms.
Commit
739dd489f1fc094abcf77051183a6d83180386cfb58efc82dd2a55a1d85d985f
Parent
898151877f92811…
2 files changed
+1
-1
+15
-5
+1
-1
| --- test/symlinks.test | ||
| +++ test/symlinks.test | ||
| @@ -18,11 +18,11 @@ | ||
| 18 | 18 | # Symbolic link tests. |
| 19 | 19 | # |
| 20 | 20 | |
| 21 | 21 | set path [file dirname [info script]] |
| 22 | 22 | |
| 23 | -if {$tcl_platform(platform) eq "windows"} { | |
| 23 | +if {$is_windows} { | |
| 24 | 24 | puts "Symlinks are not supported on Windows." |
| 25 | 25 | test_cleanup_then_return |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | fossil test-th-eval --open-config "setting allow-symlinks" |
| 29 | 29 |
| --- test/symlinks.test | |
| +++ test/symlinks.test | |
| @@ -18,11 +18,11 @@ | |
| 18 | # Symbolic link tests. |
| 19 | # |
| 20 | |
| 21 | set path [file dirname [info script]] |
| 22 | |
| 23 | if {$tcl_platform(platform) eq "windows"} { |
| 24 | puts "Symlinks are not supported on Windows." |
| 25 | test_cleanup_then_return |
| 26 | } |
| 27 | |
| 28 | fossil test-th-eval --open-config "setting allow-symlinks" |
| 29 |
| --- test/symlinks.test | |
| +++ test/symlinks.test | |
| @@ -18,11 +18,11 @@ | |
| 18 | # Symbolic link tests. |
| 19 | # |
| 20 | |
| 21 | set path [file dirname [info script]] |
| 22 | |
| 23 | if {$is_windows} { |
| 24 | puts "Symlinks are not supported on Windows." |
| 25 | test_cleanup_then_return |
| 26 | } |
| 27 | |
| 28 | fossil test-th-eval --open-config "setting allow-symlinks" |
| 29 |
+15
-5
| --- test/th1.test | ||
| +++ test/th1.test | ||
| @@ -731,18 +731,23 @@ | ||
| 731 | 731 | test th1-trace-1 {$RESULT eq {}} |
| 732 | 732 | |
| 733 | 733 | ############################################################################### |
| 734 | 734 | |
| 735 | 735 | fossil test-th-eval --th-trace "trace {}" |
| 736 | +set normalized_result [normalize_result] | |
| 737 | + | |
| 738 | +regsub -- {\n/\*\*\*\*\* Subprocess \d+ exit\(\d+\) \*\*\*\*\*/} \ | |
| 739 | + $normalized_result {} normalized_result | |
| 740 | + | |
| 736 | 741 | if {$th1Hooks} { |
| 737 | - test th1-trace-2 {[normalize_result] eq \ | |
| 742 | + test th1-trace-2 {$normalized_result eq \ | |
| 738 | 743 | {------------------ BEGIN TRACE LOG ------------------ |
| 739 | 744 | th1-init 0x0 => 0x0<br /> |
| 740 | 745 | |
| 741 | 746 | ------------------- END TRACE LOG -------------------}} |
| 742 | 747 | } else { |
| 743 | - test th1-trace-2 {[normalize_result] eq \ | |
| 748 | + test th1-trace-2 {$normalized_result eq \ | |
| 744 | 749 | {------------------ BEGIN TRACE LOG ------------------ |
| 745 | 750 | th1-init 0x0 => 0x0<br /> |
| 746 | 751 | th1-setup {} => TH_OK<br /> |
| 747 | 752 | |
| 748 | 753 | ------------------- END TRACE LOG -------------------}} |
| @@ -754,18 +759,23 @@ | ||
| 754 | 759 | test th1-trace-3 {$RESULT eq {}} |
| 755 | 760 | |
| 756 | 761 | ############################################################################### |
| 757 | 762 | |
| 758 | 763 | fossil test-th-eval --th-trace "trace {this is a trace message.}" |
| 764 | +set normalized_result [normalize_result] | |
| 765 | + | |
| 766 | +regsub -- {\n/\*\*\*\*\* Subprocess \d+ exit\(\d+\) \*\*\*\*\*/} \ | |
| 767 | + $normalized_result {} normalized_result | |
| 768 | + | |
| 759 | 769 | if {$th1Hooks} { |
| 760 | - test th1-trace-4 {[normalize_result] eq \ | |
| 770 | + test th1-trace-4 {$normalized_result eq \ | |
| 761 | 771 | {------------------ BEGIN TRACE LOG ------------------ |
| 762 | 772 | th1-init 0x0 => 0x0<br /> |
| 763 | 773 | this is a trace message. |
| 764 | 774 | ------------------- END TRACE LOG -------------------}} |
| 765 | 775 | } else { |
| 766 | - test th1-trace-4 {[normalize_result] eq \ | |
| 776 | + test th1-trace-4 {$normalized_result eq \ | |
| 767 | 777 | {------------------ BEGIN TRACE LOG ------------------ |
| 768 | 778 | th1-init 0x0 => 0x0<br /> |
| 769 | 779 | th1-setup {} => TH_OK<br /> |
| 770 | 780 | this is a trace message. |
| 771 | 781 | ------------------- END TRACE LOG -------------------}} |
| @@ -1011,11 +1021,11 @@ | ||
| 1011 | 1021 | fossil test-th-eval "globalState vfs" |
| 1012 | 1022 | test th1-globalState-14 {[string length $RESULT] == 0} |
| 1013 | 1023 | |
| 1014 | 1024 | ############################################################################### |
| 1015 | 1025 | |
| 1016 | -if {$tcl_platform(platform) eq "windows"} { | |
| 1026 | +if {$is_windows} { | |
| 1017 | 1027 | set altVfs win32-longpath |
| 1018 | 1028 | } else { |
| 1019 | 1029 | set altVfs unix-dotfile |
| 1020 | 1030 | } |
| 1021 | 1031 | |
| 1022 | 1032 |
| --- test/th1.test | |
| +++ test/th1.test | |
| @@ -731,18 +731,23 @@ | |
| 731 | test th1-trace-1 {$RESULT eq {}} |
| 732 | |
| 733 | ############################################################################### |
| 734 | |
| 735 | fossil test-th-eval --th-trace "trace {}" |
| 736 | if {$th1Hooks} { |
| 737 | test th1-trace-2 {[normalize_result] eq \ |
| 738 | {------------------ BEGIN TRACE LOG ------------------ |
| 739 | th1-init 0x0 => 0x0<br /> |
| 740 | |
| 741 | ------------------- END TRACE LOG -------------------}} |
| 742 | } else { |
| 743 | test th1-trace-2 {[normalize_result] eq \ |
| 744 | {------------------ BEGIN TRACE LOG ------------------ |
| 745 | th1-init 0x0 => 0x0<br /> |
| 746 | th1-setup {} => TH_OK<br /> |
| 747 | |
| 748 | ------------------- END TRACE LOG -------------------}} |
| @@ -754,18 +759,23 @@ | |
| 754 | test th1-trace-3 {$RESULT eq {}} |
| 755 | |
| 756 | ############################################################################### |
| 757 | |
| 758 | fossil test-th-eval --th-trace "trace {this is a trace message.}" |
| 759 | if {$th1Hooks} { |
| 760 | test th1-trace-4 {[normalize_result] eq \ |
| 761 | {------------------ BEGIN TRACE LOG ------------------ |
| 762 | th1-init 0x0 => 0x0<br /> |
| 763 | this is a trace message. |
| 764 | ------------------- END TRACE LOG -------------------}} |
| 765 | } else { |
| 766 | test th1-trace-4 {[normalize_result] eq \ |
| 767 | {------------------ BEGIN TRACE LOG ------------------ |
| 768 | th1-init 0x0 => 0x0<br /> |
| 769 | th1-setup {} => TH_OK<br /> |
| 770 | this is a trace message. |
| 771 | ------------------- END TRACE LOG -------------------}} |
| @@ -1011,11 +1021,11 @@ | |
| 1011 | fossil test-th-eval "globalState vfs" |
| 1012 | test th1-globalState-14 {[string length $RESULT] == 0} |
| 1013 | |
| 1014 | ############################################################################### |
| 1015 | |
| 1016 | if {$tcl_platform(platform) eq "windows"} { |
| 1017 | set altVfs win32-longpath |
| 1018 | } else { |
| 1019 | set altVfs unix-dotfile |
| 1020 | } |
| 1021 | |
| 1022 |
| --- test/th1.test | |
| +++ test/th1.test | |
| @@ -731,18 +731,23 @@ | |
| 731 | test th1-trace-1 {$RESULT eq {}} |
| 732 | |
| 733 | ############################################################################### |
| 734 | |
| 735 | fossil test-th-eval --th-trace "trace {}" |
| 736 | set normalized_result [normalize_result] |
| 737 | |
| 738 | regsub -- {\n/\*\*\*\*\* Subprocess \d+ exit\(\d+\) \*\*\*\*\*/} \ |
| 739 | $normalized_result {} normalized_result |
| 740 | |
| 741 | if {$th1Hooks} { |
| 742 | test th1-trace-2 {$normalized_result eq \ |
| 743 | {------------------ BEGIN TRACE LOG ------------------ |
| 744 | th1-init 0x0 => 0x0<br /> |
| 745 | |
| 746 | ------------------- END TRACE LOG -------------------}} |
| 747 | } else { |
| 748 | test th1-trace-2 {$normalized_result eq \ |
| 749 | {------------------ BEGIN TRACE LOG ------------------ |
| 750 | th1-init 0x0 => 0x0<br /> |
| 751 | th1-setup {} => TH_OK<br /> |
| 752 | |
| 753 | ------------------- END TRACE LOG -------------------}} |
| @@ -754,18 +759,23 @@ | |
| 759 | test th1-trace-3 {$RESULT eq {}} |
| 760 | |
| 761 | ############################################################################### |
| 762 | |
| 763 | fossil test-th-eval --th-trace "trace {this is a trace message.}" |
| 764 | set normalized_result [normalize_result] |
| 765 | |
| 766 | regsub -- {\n/\*\*\*\*\* Subprocess \d+ exit\(\d+\) \*\*\*\*\*/} \ |
| 767 | $normalized_result {} normalized_result |
| 768 | |
| 769 | if {$th1Hooks} { |
| 770 | test th1-trace-4 {$normalized_result eq \ |
| 771 | {------------------ BEGIN TRACE LOG ------------------ |
| 772 | th1-init 0x0 => 0x0<br /> |
| 773 | this is a trace message. |
| 774 | ------------------- END TRACE LOG -------------------}} |
| 775 | } else { |
| 776 | test th1-trace-4 {$normalized_result eq \ |
| 777 | {------------------ BEGIN TRACE LOG ------------------ |
| 778 | th1-init 0x0 => 0x0<br /> |
| 779 | th1-setup {} => TH_OK<br /> |
| 780 | this is a trace message. |
| 781 | ------------------- END TRACE LOG -------------------}} |
| @@ -1011,11 +1021,11 @@ | |
| 1021 | fossil test-th-eval "globalState vfs" |
| 1022 | test th1-globalState-14 {[string length $RESULT] == 0} |
| 1023 | |
| 1024 | ############################################################################### |
| 1025 | |
| 1026 | if {$is_windows} { |
| 1027 | set altVfs win32-longpath |
| 1028 | } else { |
| 1029 | set altVfs unix-dotfile |
| 1030 | } |
| 1031 | |
| 1032 |