Fossil SCM

Fixes to the 'th1' test to account for a trace output difference on non-Windows platforms.

mistachkin 2021-04-02 02:57 trunk
Commit 739dd489f1fc094abcf77051183a6d83180386cfb58efc82dd2a55a1d85d985f
2 files changed +1 -1 +15 -5
--- test/symlinks.test
+++ test/symlinks.test
@@ -18,11 +18,11 @@
1818
# Symbolic link tests.
1919
#
2020
2121
set path [file dirname [info script]]
2222
23
-if {$tcl_platform(platform) eq "windows"} {
23
+if {$is_windows} {
2424
puts "Symlinks are not supported on Windows."
2525
test_cleanup_then_return
2626
}
2727
2828
fossil test-th-eval --open-config "setting allow-symlinks"
2929
--- 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 @@
731731
test th1-trace-1 {$RESULT eq {}}
732732
733733
###############################################################################
734734
735735
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
+
736741
if {$th1Hooks} {
737
- test th1-trace-2 {[normalize_result] eq \
742
+ test th1-trace-2 {$normalized_result eq \
738743
{------------------ BEGIN TRACE LOG ------------------
739744
th1-init 0x0 => 0x0<br />
740745
741746
------------------- END TRACE LOG -------------------}}
742747
} else {
743
- test th1-trace-2 {[normalize_result] eq \
748
+ test th1-trace-2 {$normalized_result eq \
744749
{------------------ BEGIN TRACE LOG ------------------
745750
th1-init 0x0 => 0x0<br />
746751
th1-setup {} => TH_OK<br />
747752
748753
------------------- END TRACE LOG -------------------}}
@@ -754,18 +759,23 @@
754759
test th1-trace-3 {$RESULT eq {}}
755760
756761
###############################################################################
757762
758763
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
+
759769
if {$th1Hooks} {
760
- test th1-trace-4 {[normalize_result] eq \
770
+ test th1-trace-4 {$normalized_result eq \
761771
{------------------ BEGIN TRACE LOG ------------------
762772
th1-init 0x0 => 0x0<br />
763773
this is a trace message.
764774
------------------- END TRACE LOG -------------------}}
765775
} else {
766
- test th1-trace-4 {[normalize_result] eq \
776
+ test th1-trace-4 {$normalized_result eq \
767777
{------------------ BEGIN TRACE LOG ------------------
768778
th1-init 0x0 => 0x0<br />
769779
th1-setup {} => TH_OK<br />
770780
this is a trace message.
771781
------------------- END TRACE LOG -------------------}}
@@ -1011,11 +1021,11 @@
10111021
fossil test-th-eval "globalState vfs"
10121022
test th1-globalState-14 {[string length $RESULT] == 0}
10131023
10141024
###############################################################################
10151025
1016
-if {$tcl_platform(platform) eq "windows"} {
1026
+if {$is_windows} {
10171027
set altVfs win32-longpath
10181028
} else {
10191029
set altVfs unix-dotfile
10201030
}
10211031
10221032
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button