Fossil SCM

Rename the test suite procedure 'repo_init' to 'test_setup'.

drh 2016-03-02 20:43 testerCleanup
Commit 413921cca04863b37c42d54d8fa28df51466cd53
+1 -1
--- test/amend.test
+++ test/amend.test
@@ -47,11 +47,11 @@
4747
fossil status
4848
regexp {checkout:\s+([0-9a-f]{40})} $RESULT m UUID
4949
}
5050
5151
# Make sure we are not in an open repository and initialize new repository
52
-repo_init
52
+test_setup
5353
5454
########################################
5555
# Setup: Add file and commit #
5656
########################################
5757
5858
--- test/amend.test
+++ test/amend.test
@@ -47,11 +47,11 @@
47 fossil status
48 regexp {checkout:\s+([0-9a-f]{40})} $RESULT m UUID
49 }
50
51 # Make sure we are not in an open repository and initialize new repository
52 repo_init
53
54 ########################################
55 # Setup: Add file and commit #
56 ########################################
57
58
--- test/amend.test
+++ test/amend.test
@@ -47,11 +47,11 @@
47 fossil status
48 regexp {checkout:\s+([0-9a-f]{40})} $RESULT m UUID
49 }
50
51 # Make sure we are not in an open repository and initialize new repository
52 test_setup
53
54 ########################################
55 # Setup: Add file and commit #
56 ########################################
57
58
+1 -1
--- test/clean.test
+++ test/clean.test
@@ -16,11 +16,11 @@
1616
############################################################################
1717
#
1818
# Tests of the "clean" command, including the ability to undo it.
1919
#
2020
21
-repo_init
21
+test_setup
2222
2323
###############################################################################
2424
2525
fossil extra
2626
test clean-0 {[normalize_result] eq {}}
2727
--- test/clean.test
+++ test/clean.test
@@ -16,11 +16,11 @@
16 ############################################################################
17 #
18 # Tests of the "clean" command, including the ability to undo it.
19 #
20
21 repo_init
22
23 ###############################################################################
24
25 fossil extra
26 test clean-0 {[normalize_result] eq {}}
27
--- test/clean.test
+++ test/clean.test
@@ -16,11 +16,11 @@
16 ############################################################################
17 #
18 # Tests of the "clean" command, including the ability to undo it.
19 #
20
21 test_setup
22
23 ###############################################################################
24
25 fossil extra
26 test clean-0 {[normalize_result] eq {}}
27
--- test/cmdline.test
+++ test/cmdline.test
@@ -16,11 +16,11 @@
1616
############################################################################
1717
#
1818
# Test command line parsing
1919
#
2020
21
-repo_init ""
21
+test_setup ""
2222
2323
proc cmd-line {testname args} {
2424
set i 1
2525
foreach {cmdline result} $args {
2626
fossil test-echo $cmdline
2727
--- test/cmdline.test
+++ test/cmdline.test
@@ -16,11 +16,11 @@
16 ############################################################################
17 #
18 # Test command line parsing
19 #
20
21 repo_init ""
22
23 proc cmd-line {testname args} {
24 set i 1
25 foreach {cmdline result} $args {
26 fossil test-echo $cmdline
27
--- test/cmdline.test
+++ test/cmdline.test
@@ -16,11 +16,11 @@
16 ############################################################################
17 #
18 # Test command line parsing
19 #
20
21 test_setup ""
22
23 proc cmd-line {testname args} {
24 set i 1
25 foreach {cmdline result} $args {
26 fossil test-echo $cmdline
27
--- test/comment.test
+++ test/comment.test
@@ -16,11 +16,11 @@
1616
############################################################################
1717
#
1818
# Test comment formatting and printing.
1919
#
2020
21
-repo_init ""
21
+test_setup ""
2222
2323
###############################################################################
2424
2525
fossil test-comment-format "" ""
2626
test comment-1 {$RESULT eq "\n(1 lines output)"}
2727
--- test/comment.test
+++ test/comment.test
@@ -16,11 +16,11 @@
16 ############################################################################
17 #
18 # Test comment formatting and printing.
19 #
20
21 repo_init ""
22
23 ###############################################################################
24
25 fossil test-comment-format "" ""
26 test comment-1 {$RESULT eq "\n(1 lines output)"}
27
--- test/comment.test
+++ test/comment.test
@@ -16,11 +16,11 @@
16 ############################################################################
17 #
18 # Test comment formatting and printing.
19 #
20
21 test_setup ""
22
23 ###############################################################################
24
25 fossil test-comment-format "" ""
26 test comment-1 {$RESULT eq "\n(1 lines output)"}
27
--- test/contains-selector.test
+++ test/contains-selector.test
@@ -16,11 +16,11 @@
1616
############################################################################
1717
#
1818
# Test containsSelector() function in src/style.c
1919
#
2020
21
-repo_init ""
21
+test_setup ""
2222
2323
proc contains-selector {testId css selectorResultMap} {
2424
set css [string trim $css]
2525
set filename [file join $::tempPath compare-selector.css]
2626
set fh [open $filename w]
2727
--- test/contains-selector.test
+++ test/contains-selector.test
@@ -16,11 +16,11 @@
16 ############################################################################
17 #
18 # Test containsSelector() function in src/style.c
19 #
20
21 repo_init ""
22
23 proc contains-selector {testId css selectorResultMap} {
24 set css [string trim $css]
25 set filename [file join $::tempPath compare-selector.css]
26 set fh [open $filename w]
27
--- test/contains-selector.test
+++ test/contains-selector.test
@@ -16,11 +16,11 @@
16 ############################################################################
17 #
18 # Test containsSelector() function in src/style.c
19 #
20
21 test_setup ""
22
23 proc contains-selector {testId css selectorResultMap} {
24 set css [string trim $css]
25 set filename [file join $::tempPath compare-selector.css]
26 set fh [open $filename w]
27
--- test/delta1.test
+++ test/delta1.test
@@ -16,11 +16,11 @@
1616
############################################################################
1717
#
1818
# Tests of the delta mechanism.
1919
#
2020
21
-repo_init ""
21
+test_setup ""
2222
2323
# Use test script files as the basis for this test.
2424
#
2525
# For each test, copy the file intact to "./t1". Make
2626
# some random changes in "./t2". Then call test-delta on the
2727
--- test/delta1.test
+++ test/delta1.test
@@ -16,11 +16,11 @@
16 ############################################################################
17 #
18 # Tests of the delta mechanism.
19 #
20
21 repo_init ""
22
23 # Use test script files as the basis for this test.
24 #
25 # For each test, copy the file intact to "./t1". Make
26 # some random changes in "./t2". Then call test-delta on the
27
--- test/delta1.test
+++ test/delta1.test
@@ -16,11 +16,11 @@
16 ############################################################################
17 #
18 # Tests of the delta mechanism.
19 #
20
21 test_setup ""
22
23 # Use test script files as the basis for this test.
24 #
25 # For each test, copy the file intact to "./t1". Make
26 # some random changes in "./t2". Then call test-delta on the
27
+1 -1
--- test/file1.test
+++ test/file1.test
@@ -16,11 +16,11 @@
1616
############################################################################
1717
#
1818
# File utilities
1919
#
2020
21
-repo_init
21
+test_setup
2222
2323
proc simplify-name {testname args} {
2424
set i 1
2525
foreach {path result} $args {
2626
fossil test-simplify-name $path
2727
--- test/file1.test
+++ test/file1.test
@@ -16,11 +16,11 @@
16 ############################################################################
17 #
18 # File utilities
19 #
20
21 repo_init
22
23 proc simplify-name {testname args} {
24 set i 1
25 foreach {path result} $args {
26 fossil test-simplify-name $path
27
--- test/file1.test
+++ test/file1.test
@@ -16,11 +16,11 @@
16 ############################################################################
17 #
18 # File utilities
19 #
20
21 test_setup
22
23 proc simplify-name {testname args} {
24 set i 1
25 foreach {path result} $args {
26 fossil test-simplify-name $path
27
+1 -1
--- test/glob.test
+++ test/glob.test
@@ -16,11 +16,11 @@
1616
############################################################################
1717
#
1818
# Test glob pattern parsing
1919
#
2020
21
-repo_init ""
21
+test_setup ""
2222
2323
proc glob-parse {testname args} {
2424
set i 1
2525
foreach {pattern string result} $args {
2626
fossil test-glob $pattern $string
2727
--- test/glob.test
+++ test/glob.test
@@ -16,11 +16,11 @@
16 ############################################################################
17 #
18 # Test glob pattern parsing
19 #
20
21 repo_init ""
22
23 proc glob-parse {testname args} {
24 set i 1
25 foreach {pattern string result} $args {
26 fossil test-glob $pattern $string
27
--- test/glob.test
+++ test/glob.test
@@ -16,11 +16,11 @@
16 ############################################################################
17 #
18 # Test glob pattern parsing
19 #
20
21 test_setup ""
22
23 proc glob-parse {testname args} {
24 set i 1
25 foreach {pattern string result} $args {
26 fossil test-glob $pattern $string
27
+2 -2
--- test/json.test
+++ test/json.test
@@ -163,11 +163,11 @@
163163
}
164164
165165
#### VERSION AKA HAI
166166
167167
# The JSON API generally assumes we have a respository, so let it have one.
168
-repo_init
168
+test_setup
169169
170170
# Check for basic envelope fields in the result with an error
171171
fossil_json -expectError
172172
test_json_envelope json-enverr [concat resultCode fossil timestamp \
173173
resultText command procTimeUs procTimeMs] {}
@@ -666,11 +666,11 @@
666666
# is not writable" error comes back as HTML. i don't know if the
667667
# error happens before we have made the determination that the app is
668668
# in JSON mode or if the error handling is incorrectly not
669669
# recognizing JSON mode.
670670
#
671
-#repo_init x.fossil
671
+#test_setup x.fossil
672672
#catch {exec chmod 444 .rep.fossil}; # Unix. What about Win?
673673
fossil_http_json /json/timeline/checkin $U1Cookie
674674
test json-ROrepo-1-1 {$CODE == 0}
675675
test json-ROrepo-1-2 {[regexp {\}\s*$} $RESULT]}
676676
test json-ROrepo-1-3 {![regexp {SQLITE_[A-Z]+:} $RESULT]}
677677
--- test/json.test
+++ test/json.test
@@ -163,11 +163,11 @@
163 }
164
165 #### VERSION AKA HAI
166
167 # The JSON API generally assumes we have a respository, so let it have one.
168 repo_init
169
170 # Check for basic envelope fields in the result with an error
171 fossil_json -expectError
172 test_json_envelope json-enverr [concat resultCode fossil timestamp \
173 resultText command procTimeUs procTimeMs] {}
@@ -666,11 +666,11 @@
666 # is not writable" error comes back as HTML. i don't know if the
667 # error happens before we have made the determination that the app is
668 # in JSON mode or if the error handling is incorrectly not
669 # recognizing JSON mode.
670 #
671 #repo_init x.fossil
672 #catch {exec chmod 444 .rep.fossil}; # Unix. What about Win?
673 fossil_http_json /json/timeline/checkin $U1Cookie
674 test json-ROrepo-1-1 {$CODE == 0}
675 test json-ROrepo-1-2 {[regexp {\}\s*$} $RESULT]}
676 test json-ROrepo-1-3 {![regexp {SQLITE_[A-Z]+:} $RESULT]}
677
--- test/json.test
+++ test/json.test
@@ -163,11 +163,11 @@
163 }
164
165 #### VERSION AKA HAI
166
167 # The JSON API generally assumes we have a respository, so let it have one.
168 test_setup
169
170 # Check for basic envelope fields in the result with an error
171 fossil_json -expectError
172 test_json_envelope json-enverr [concat resultCode fossil timestamp \
173 resultText command procTimeUs procTimeMs] {}
@@ -666,11 +666,11 @@
666 # is not writable" error comes back as HTML. i don't know if the
667 # error happens before we have made the determination that the app is
668 # in JSON mode or if the error handling is incorrectly not
669 # recognizing JSON mode.
670 #
671 #test_setup x.fossil
672 #catch {exec chmod 444 .rep.fossil}; # Unix. What about Win?
673 fossil_http_json /json/timeline/checkin $U1Cookie
674 test json-ROrepo-1-1 {$CODE == 0}
675 test json-ROrepo-1-2 {[regexp {\}\s*$} $RESULT]}
676 test json-ROrepo-1-3 {![regexp {SQLITE_[A-Z]+:} $RESULT]}
677
--- test/merge1.test
+++ test/merge1.test
@@ -16,11 +16,11 @@
1616
############################################################################
1717
#
1818
# Tests of the 3-way merge
1919
#
2020
21
-repo_init ""
21
+test_setup ""
2222
2323
write_file_indented t1 {
2424
111 - This is line one of the demo program - 1111
2525
222 - The second line program line in code - 2222
2626
333 - This is a test of the merging algohm - 3333
2727
--- test/merge1.test
+++ test/merge1.test
@@ -16,11 +16,11 @@
16 ############################################################################
17 #
18 # Tests of the 3-way merge
19 #
20
21 repo_init ""
22
23 write_file_indented t1 {
24 111 - This is line one of the demo program - 1111
25 222 - The second line program line in code - 2222
26 333 - This is a test of the merging algohm - 3333
27
--- test/merge1.test
+++ test/merge1.test
@@ -16,11 +16,11 @@
16 ############################################################################
17 #
18 # Tests of the 3-way merge
19 #
20
21 test_setup ""
22
23 write_file_indented t1 {
24 111 - This is line one of the demo program - 1111
25 222 - The second line program line in code - 2222
26 333 - This is a test of the merging algohm - 3333
27
--- test/merge2.test
+++ test/merge2.test
@@ -16,11 +16,11 @@
1616
############################################################################
1717
#
1818
# Tests of the delta mechanism.
1919
#
2020
21
-repo_init ""
21
+test_setup ""
2222
2323
set filelist [glob $testdir/*]
2424
foreach f $filelist {
2525
if {[file isdir $f]} continue
2626
set base [file root [file tail $f]]
2727
--- test/merge2.test
+++ test/merge2.test
@@ -16,11 +16,11 @@
16 ############################################################################
17 #
18 # Tests of the delta mechanism.
19 #
20
21 repo_init ""
22
23 set filelist [glob $testdir/*]
24 foreach f $filelist {
25 if {[file isdir $f]} continue
26 set base [file root [file tail $f]]
27
--- test/merge2.test
+++ test/merge2.test
@@ -16,11 +16,11 @@
16 ############################################################################
17 #
18 # Tests of the delta mechanism.
19 #
20
21 test_setup ""
22
23 set filelist [glob $testdir/*]
24 foreach f $filelist {
25 if {[file isdir $f]} continue
26 set base [file root [file tail $f]]
27
--- test/merge3.test
+++ test/merge3.test
@@ -16,11 +16,11 @@
1616
############################################################################
1717
#
1818
# Tests of the 3-way merge
1919
#
2020
21
-repo_init ""
21
+test_setup ""
2222
2323
proc merge-test {testid basis v1 v2 result} {
2424
write_file t1 [join [string trim $basis] \n]\n
2525
write_file t2 [join [string trim $v1] \n]\n
2626
write_file t3 [join [string trim $v2] \n]\n
2727
--- test/merge3.test
+++ test/merge3.test
@@ -16,11 +16,11 @@
16 ############################################################################
17 #
18 # Tests of the 3-way merge
19 #
20
21 repo_init ""
22
23 proc merge-test {testid basis v1 v2 result} {
24 write_file t1 [join [string trim $basis] \n]\n
25 write_file t2 [join [string trim $v1] \n]\n
26 write_file t3 [join [string trim $v2] \n]\n
27
--- test/merge3.test
+++ test/merge3.test
@@ -16,11 +16,11 @@
16 ############################################################################
17 #
18 # Tests of the 3-way merge
19 #
20
21 test_setup ""
22
23 proc merge-test {testid basis v1 v2 result} {
24 write_file t1 [join [string trim $basis] \n]\n
25 write_file t2 [join [string trim $v1] \n]\n
26 write_file t3 [join [string trim $v2] \n]\n
27
--- test/merge4.test
+++ test/merge4.test
@@ -16,11 +16,11 @@
1616
############################################################################
1717
#
1818
# Tests of the 3-way merge
1919
#
2020
21
-repo_init ""
21
+test_setup ""
2222
2323
proc merge-test {testid basis v1 v2 result1 result2} {
2424
write_file t1 [join [string trim $basis] \n]\n
2525
write_file t2 [join [string trim $v1] \n]\n
2626
write_file t3 [join [string trim $v2] \n]\n
2727
--- test/merge4.test
+++ test/merge4.test
@@ -16,11 +16,11 @@
16 ############################################################################
17 #
18 # Tests of the 3-way merge
19 #
20
21 repo_init ""
22
23 proc merge-test {testid basis v1 v2 result1 result2} {
24 write_file t1 [join [string trim $basis] \n]\n
25 write_file t2 [join [string trim $v1] \n]\n
26 write_file t3 [join [string trim $v2] \n]\n
27
--- test/merge4.test
+++ test/merge4.test
@@ -16,11 +16,11 @@
16 ############################################################################
17 #
18 # Tests of the 3-way merge
19 #
20
21 test_setup ""
22
23 proc merge-test {testid basis v1 v2 result1 result2} {
24 write_file t1 [join [string trim $basis] \n]\n
25 write_file t2 [join [string trim $v1] \n]\n
26 write_file t3 [join [string trim $v2] \n]\n
27
--- test/merge5.test
+++ test/merge5.test
@@ -36,11 +36,11 @@
3636
} else {
3737
test merge5-$testid 1
3838
}
3939
}
4040
41
-require_no_open_checkout; repo_init ""
41
+require_no_open_checkout; test_setup ""
4242
4343
# Construct a test repository
4444
#
4545
exec $::fossilexe sqlite3 --no-repository m5.fossil <$testdir/${testfile}_repo.sql
4646
fossil rebuild m5.fossil
4747
--- test/merge5.test
+++ test/merge5.test
@@ -36,11 +36,11 @@
36 } else {
37 test merge5-$testid 1
38 }
39 }
40
41 require_no_open_checkout; repo_init ""
42
43 # Construct a test repository
44 #
45 exec $::fossilexe sqlite3 --no-repository m5.fossil <$testdir/${testfile}_repo.sql
46 fossil rebuild m5.fossil
47
--- test/merge5.test
+++ test/merge5.test
@@ -36,11 +36,11 @@
36 } else {
37 test merge5-$testid 1
38 }
39 }
40
41 require_no_open_checkout; test_setup ""
42
43 # Construct a test repository
44 #
45 exec $::fossilexe sqlite3 --no-repository m5.fossil <$testdir/${testfile}_repo.sql
46 fossil rebuild m5.fossil
47
--- test/merge6.test
+++ test/merge6.test
@@ -20,11 +20,11 @@
2020
2121
####################################################################
2222
# TEST 1: Handle multiple merges each with one or more ADDED files #
2323
####################################################################
2424
25
-repo_init
25
+test_setup
2626
fossil ls
2727
2828
test merge_multi-0 {[normalize_result] eq {}}
2929
3030
write_file f1 "f1 line"
3131
--- test/merge6.test
+++ test/merge6.test
@@ -20,11 +20,11 @@
20
21 ####################################################################
22 # TEST 1: Handle multiple merges each with one or more ADDED files #
23 ####################################################################
24
25 repo_init
26 fossil ls
27
28 test merge_multi-0 {[normalize_result] eq {}}
29
30 write_file f1 "f1 line"
31
--- test/merge6.test
+++ test/merge6.test
@@ -20,11 +20,11 @@
20
21 ####################################################################
22 # TEST 1: Handle multiple merges each with one or more ADDED files #
23 ####################################################################
24
25 test_setup
26 fossil ls
27
28 test merge_multi-0 {[normalize_result] eq {}}
29
30 write_file f1 "f1 line"
31
--- test/merge_renames.test
+++ test/merge_renames.test
@@ -8,11 +8,11 @@
88
######################################
99
# Test 1 #
1010
# Reported: Ticket [554f44ee74e3d] #
1111
######################################
1212
13
-repo_init
13
+test_setup
1414
1515
write_file f1 "line"
1616
fossil add f1
1717
fossil commit -m "c1"
1818
fossil tag add pivot current
@@ -66,11 +66,11 @@
6666
######################################
6767
# Test 2 #
6868
# Reported: Ticket [74413366fe5067] #
6969
######################################
7070
71
-repo_init
71
+test_setup
7272
7373
write_file f1 "line"
7474
fossil add f1
7575
fossil commit -m "base file"
7676
fossil tag add pivot current
@@ -114,11 +114,11 @@
114114
######################################
115115
# Test 3 #
116116
# Reported: Ticket [30b28cf351] #
117117
######################################
118118
119
-repo_init
119
+test_setup
120120
121121
write_file f1 "line"
122122
fossil add f1
123123
fossil commit -m "base file"
124124
fossil tag add pivot current
@@ -169,11 +169,11 @@
169169
######################################
170170
# Test 5 #
171171
# Handle Rename/Add via Merge #
172172
######################################
173173
174
-repo_init
174
+test_setup
175175
176176
write_file f1 "old f1 line"
177177
fossil add f1
178178
fossil commit -m "base file"
179179
180180
--- test/merge_renames.test
+++ test/merge_renames.test
@@ -8,11 +8,11 @@
8 ######################################
9 # Test 1 #
10 # Reported: Ticket [554f44ee74e3d] #
11 ######################################
12
13 repo_init
14
15 write_file f1 "line"
16 fossil add f1
17 fossil commit -m "c1"
18 fossil tag add pivot current
@@ -66,11 +66,11 @@
66 ######################################
67 # Test 2 #
68 # Reported: Ticket [74413366fe5067] #
69 ######################################
70
71 repo_init
72
73 write_file f1 "line"
74 fossil add f1
75 fossil commit -m "base file"
76 fossil tag add pivot current
@@ -114,11 +114,11 @@
114 ######################################
115 # Test 3 #
116 # Reported: Ticket [30b28cf351] #
117 ######################################
118
119 repo_init
120
121 write_file f1 "line"
122 fossil add f1
123 fossil commit -m "base file"
124 fossil tag add pivot current
@@ -169,11 +169,11 @@
169 ######################################
170 # Test 5 #
171 # Handle Rename/Add via Merge #
172 ######################################
173
174 repo_init
175
176 write_file f1 "old f1 line"
177 fossil add f1
178 fossil commit -m "base file"
179
180
--- test/merge_renames.test
+++ test/merge_renames.test
@@ -8,11 +8,11 @@
8 ######################################
9 # Test 1 #
10 # Reported: Ticket [554f44ee74e3d] #
11 ######################################
12
13 test_setup
14
15 write_file f1 "line"
16 fossil add f1
17 fossil commit -m "c1"
18 fossil tag add pivot current
@@ -66,11 +66,11 @@
66 ######################################
67 # Test 2 #
68 # Reported: Ticket [74413366fe5067] #
69 ######################################
70
71 test_setup
72
73 write_file f1 "line"
74 fossil add f1
75 fossil commit -m "base file"
76 fossil tag add pivot current
@@ -114,11 +114,11 @@
114 ######################################
115 # Test 3 #
116 # Reported: Ticket [30b28cf351] #
117 ######################################
118
119 test_setup
120
121 write_file f1 "line"
122 fossil add f1
123 fossil commit -m "base file"
124 fossil tag add pivot current
@@ -169,11 +169,11 @@
169 ######################################
170 # Test 5 #
171 # Handle Rename/Add via Merge #
172 ######################################
173
174 test_setup
175
176 write_file f1 "old f1 line"
177 fossil add f1
178 fossil commit -m "base file"
179
180
+1 -1
--- test/mv-rm.test
+++ test/mv-rm.test
@@ -22,11 +22,11 @@
2222
2323
########################################
2424
# Setup: Add Files and Commit #
2525
########################################
2626
27
-repo_init; set rootDir [file normalize [pwd]]
27
+test_setup; set rootDir [file normalize [pwd]]
2828
2929
set undoMsg "\n \"fossil undo\" is\
3030
available to undo changes to the\
3131
working checkout."
3232
3333
--- test/mv-rm.test
+++ test/mv-rm.test
@@ -22,11 +22,11 @@
22
23 ########################################
24 # Setup: Add Files and Commit #
25 ########################################
26
27 repo_init; set rootDir [file normalize [pwd]]
28
29 set undoMsg "\n \"fossil undo\" is\
30 available to undo changes to the\
31 working checkout."
32
33
--- test/mv-rm.test
+++ test/mv-rm.test
@@ -22,11 +22,11 @@
22
23 ########################################
24 # Setup: Add Files and Commit #
25 ########################################
26
27 test_setup; set rootDir [file normalize [pwd]]
28
29 set undoMsg "\n \"fossil undo\" is\
30 available to undo changes to the\
31 working checkout."
32
33
--- test/revert.test
+++ test/revert.test
@@ -55,11 +55,11 @@
5555
5656
fossil undo
5757
}
5858
5959
require_no_open_checkout
60
-repo_init
60
+test_setup
6161
6262
# Prepare first commit
6363
#
6464
write_file f1 "f1"
6565
write_file f2 "f2"
@@ -157,11 +157,11 @@
157157
158158
159159
# Test reverting the combination of a renamed file and an added file that
160160
# uses the renamed file's original filename.
161161
#
162
-repo_init
162
+test_setup
163163
write_file f1 "f1"
164164
fossil add f1
165165
fossil commit -m "add f1"
166166
167167
write_file f1n "f1n"
@@ -175,11 +175,11 @@
175175
} -exists {f1} -notexists {f1n}
176176
177177
178178
# Test reverting a rename in the repo but not completed in the file
179179
# system
180
-repo_init
180
+test_setup
181181
write_file f1 "f1"
182182
fossil add f1
183183
fossil commit -m "add f1"
184184
fossil mv --soft f1 f1new
185185
test 3-mv-1 {[file exists f1]}
186186
--- test/revert.test
+++ test/revert.test
@@ -55,11 +55,11 @@
55
56 fossil undo
57 }
58
59 require_no_open_checkout
60 repo_init
61
62 # Prepare first commit
63 #
64 write_file f1 "f1"
65 write_file f2 "f2"
@@ -157,11 +157,11 @@
157
158
159 # Test reverting the combination of a renamed file and an added file that
160 # uses the renamed file's original filename.
161 #
162 repo_init
163 write_file f1 "f1"
164 fossil add f1
165 fossil commit -m "add f1"
166
167 write_file f1n "f1n"
@@ -175,11 +175,11 @@
175 } -exists {f1} -notexists {f1n}
176
177
178 # Test reverting a rename in the repo but not completed in the file
179 # system
180 repo_init
181 write_file f1 "f1"
182 fossil add f1
183 fossil commit -m "add f1"
184 fossil mv --soft f1 f1new
185 test 3-mv-1 {[file exists f1]}
186
--- test/revert.test
+++ test/revert.test
@@ -55,11 +55,11 @@
55
56 fossil undo
57 }
58
59 require_no_open_checkout
60 test_setup
61
62 # Prepare first commit
63 #
64 write_file f1 "f1"
65 write_file f2 "f2"
@@ -157,11 +157,11 @@
157
158
159 # Test reverting the combination of a renamed file and an added file that
160 # uses the renamed file's original filename.
161 #
162 test_setup
163 write_file f1 "f1"
164 fossil add f1
165 fossil commit -m "add f1"
166
167 write_file f1n "f1n"
@@ -175,11 +175,11 @@
175 } -exists {f1} -notexists {f1n}
176
177
178 # Test reverting a rename in the repo but not completed in the file
179 # system
180 test_setup
181 write_file f1 "f1"
182 fossil add f1
183 fossil commit -m "add f1"
184 fossil mv --soft f1 f1new
185 test 3-mv-1 {[file exists f1]}
186
+5 -5
--- test/stash.test
+++ test/stash.test
@@ -91,11 +91,11 @@
9191
fossil stash {*}$stashArgs
9292
return [test_result_state stash-$testid "stash $stashArgs" $expectedStashOutput {*}$args]
9393
}
9494
9595
require_no_open_checkout
96
-repo_init
96
+test_setup
9797
9898
# Prepare first commit
9999
#
100100
write_file f1 "f1"
101101
write_file f2 "f2"
@@ -226,11 +226,11 @@
226226
# uses the renamed file's original filename. I expect to see the same
227227
# behavior as fossil revert: calmly back out both the rename and the
228228
# add, and presumably stash the content of the added file before it
229229
# is replaced by the revert.
230230
#
231
-repo_init
231
+test_setup
232232
write_file f1 "f1"
233233
fossil add f1
234234
fossil commit -m "add f1"
235235
236236
write_file f1n "f1n"
@@ -249,11 +249,11 @@
249249
250250
# Test stashing a newly added (but never committed) file. As with
251251
# fossil revert, fossil stash save unmanages the new file, but
252252
# leaves the copy present on disk. This is undocumented, but
253253
# probably sensible.
254
-repo_init
254
+test_setup
255255
write_file f1 "f1"
256256
write_file f2 "f2"
257257
fossil add f1 f2
258258
fossil commit -m "baseline"
259259
@@ -283,11 +283,11 @@
283283
284284
285285
# Test stashing a rename of one file with at least one file
286286
# unchanged. This should stash (and revert) just the rename
287287
# operation. Instead it also stores and touches the unchanged file.
288
-repo_init
288
+test_setup
289289
write_file f1 "f1"
290290
write_file f2 "f2"
291291
fossil add f1 f2
292292
fossil commit -m "baseline"
293293
@@ -320,11 +320,11 @@
320320
321321
322322
########
323323
# fossil stash snapshot ?-m|--comment COMMENT? ?FILES...?
324324
325
-repo_init
325
+test_setup
326326
write_file f1 "f1"
327327
write_file f2 "f2"
328328
write_file f3 "f3"
329329
fossil add f1 f2 f3
330330
fossil commit -m "c1" --tag c1
331331
--- test/stash.test
+++ test/stash.test
@@ -91,11 +91,11 @@
91 fossil stash {*}$stashArgs
92 return [test_result_state stash-$testid "stash $stashArgs" $expectedStashOutput {*}$args]
93 }
94
95 require_no_open_checkout
96 repo_init
97
98 # Prepare first commit
99 #
100 write_file f1 "f1"
101 write_file f2 "f2"
@@ -226,11 +226,11 @@
226 # uses the renamed file's original filename. I expect to see the same
227 # behavior as fossil revert: calmly back out both the rename and the
228 # add, and presumably stash the content of the added file before it
229 # is replaced by the revert.
230 #
231 repo_init
232 write_file f1 "f1"
233 fossil add f1
234 fossil commit -m "add f1"
235
236 write_file f1n "f1n"
@@ -249,11 +249,11 @@
249
250 # Test stashing a newly added (but never committed) file. As with
251 # fossil revert, fossil stash save unmanages the new file, but
252 # leaves the copy present on disk. This is undocumented, but
253 # probably sensible.
254 repo_init
255 write_file f1 "f1"
256 write_file f2 "f2"
257 fossil add f1 f2
258 fossil commit -m "baseline"
259
@@ -283,11 +283,11 @@
283
284
285 # Test stashing a rename of one file with at least one file
286 # unchanged. This should stash (and revert) just the rename
287 # operation. Instead it also stores and touches the unchanged file.
288 repo_init
289 write_file f1 "f1"
290 write_file f2 "f2"
291 fossil add f1 f2
292 fossil commit -m "baseline"
293
@@ -320,11 +320,11 @@
320
321
322 ########
323 # fossil stash snapshot ?-m|--comment COMMENT? ?FILES...?
324
325 repo_init
326 write_file f1 "f1"
327 write_file f2 "f2"
328 write_file f3 "f3"
329 fossil add f1 f2 f3
330 fossil commit -m "c1" --tag c1
331
--- test/stash.test
+++ test/stash.test
@@ -91,11 +91,11 @@
91 fossil stash {*}$stashArgs
92 return [test_result_state stash-$testid "stash $stashArgs" $expectedStashOutput {*}$args]
93 }
94
95 require_no_open_checkout
96 test_setup
97
98 # Prepare first commit
99 #
100 write_file f1 "f1"
101 write_file f2 "f2"
@@ -226,11 +226,11 @@
226 # uses the renamed file's original filename. I expect to see the same
227 # behavior as fossil revert: calmly back out both the rename and the
228 # add, and presumably stash the content of the added file before it
229 # is replaced by the revert.
230 #
231 test_setup
232 write_file f1 "f1"
233 fossil add f1
234 fossil commit -m "add f1"
235
236 write_file f1n "f1n"
@@ -249,11 +249,11 @@
249
250 # Test stashing a newly added (but never committed) file. As with
251 # fossil revert, fossil stash save unmanages the new file, but
252 # leaves the copy present on disk. This is undocumented, but
253 # probably sensible.
254 test_setup
255 write_file f1 "f1"
256 write_file f2 "f2"
257 fossil add f1 f2
258 fossil commit -m "baseline"
259
@@ -283,11 +283,11 @@
283
284
285 # Test stashing a rename of one file with at least one file
286 # unchanged. This should stash (and revert) just the rename
287 # operation. Instead it also stores and touches the unchanged file.
288 test_setup
289 write_file f1 "f1"
290 write_file f2 "f2"
291 fossil add f1 f2
292 fossil commit -m "baseline"
293
@@ -320,11 +320,11 @@
320
321
322 ########
323 # fossil stash snapshot ?-m|--comment COMMENT? ?FILES...?
324
325 test_setup
326 write_file f1 "f1"
327 write_file f2 "f2"
328 write_file f3 "f3"
329 fossil add f1 f2 f3
330 fossil commit -m "c1" --tag c1
331
+1 -1
--- test/tester.tcl
+++ test/tester.tcl
@@ -285,11 +285,11 @@
285285
}
286286
287287
#
288288
# Create and open a new Fossil repository and clean the checkout
289289
#
290
-proc repo_init {{filename ".rep.fossil"}} {
290
+proc test_setup {{filename ".rep.fossil"}} {
291291
set_home_to_elsewhere
292292
if {![info exists ::tempRepoPath]} {
293293
set ::tempRepoPath [file join $::tempPath repo_[pid]]
294294
}
295295
set repoSeed [appendArgs [string trim [clock seconds] -] _ [getSeqNo]]
296296
--- test/tester.tcl
+++ test/tester.tcl
@@ -285,11 +285,11 @@
285 }
286
287 #
288 # Create and open a new Fossil repository and clean the checkout
289 #
290 proc repo_init {{filename ".rep.fossil"}} {
291 set_home_to_elsewhere
292 if {![info exists ::tempRepoPath]} {
293 set ::tempRepoPath [file join $::tempPath repo_[pid]]
294 }
295 set repoSeed [appendArgs [string trim [clock seconds] -] _ [getSeqNo]]
296
--- test/tester.tcl
+++ test/tester.tcl
@@ -285,11 +285,11 @@
285 }
286
287 #
288 # Create and open a new Fossil repository and clean the checkout
289 #
290 proc test_setup {{filename ".rep.fossil"}} {
291 set_home_to_elsewhere
292 if {![info exists ::tempRepoPath]} {
293 set ::tempRepoPath [file join $::tempPath repo_[pid]]
294 }
295 set repoSeed [appendArgs [string trim [clock seconds] -] _ [getSeqNo]]
296
--- test/th1-docs.test
+++ test/th1-docs.test
@@ -16,11 +16,11 @@
1616
############################################################################
1717
#
1818
# TH1 Docs
1919
#
2020
21
-repo_init ""
21
+test_setup ""
2222
2323
fossil test-th-eval "hasfeature th1Docs"
2424
2525
if {$::RESULT ne "1"} {
2626
puts "Fossil was not compiled with TH1 docs support."; return
2727
--- test/th1-docs.test
+++ test/th1-docs.test
@@ -16,11 +16,11 @@
16 ############################################################################
17 #
18 # TH1 Docs
19 #
20
21 repo_init ""
22
23 fossil test-th-eval "hasfeature th1Docs"
24
25 if {$::RESULT ne "1"} {
26 puts "Fossil was not compiled with TH1 docs support."; return
27
--- test/th1-docs.test
+++ test/th1-docs.test
@@ -16,11 +16,11 @@
16 ############################################################################
17 #
18 # TH1 Docs
19 #
20
21 test_setup ""
22
23 fossil test-th-eval "hasfeature th1Docs"
24
25 if {$::RESULT ne "1"} {
26 puts "Fossil was not compiled with TH1 docs support."; return
27
--- test/th1-hooks.test
+++ test/th1-hooks.test
@@ -24,11 +24,11 @@
2424
puts "Fossil was not compiled with TH1 hooks support."; return
2525
}
2626
2727
###############################################################################
2828
29
-repo_init
29
+test_setup
3030
write_file f1 "f1"; fossil add f1; fossil commit -m "c1"
3131
3232
###############################################################################
3333
3434
set env(TH1_ENABLE_HOOKS) 1; # TH1 hooks must be enabled for this test.
3535
--- test/th1-hooks.test
+++ test/th1-hooks.test
@@ -24,11 +24,11 @@
24 puts "Fossil was not compiled with TH1 hooks support."; return
25 }
26
27 ###############################################################################
28
29 repo_init
30 write_file f1 "f1"; fossil add f1; fossil commit -m "c1"
31
32 ###############################################################################
33
34 set env(TH1_ENABLE_HOOKS) 1; # TH1 hooks must be enabled for this test.
35
--- test/th1-hooks.test
+++ test/th1-hooks.test
@@ -24,11 +24,11 @@
24 puts "Fossil was not compiled with TH1 hooks support."; return
25 }
26
27 ###############################################################################
28
29 test_setup
30 write_file f1 "f1"; fossil add f1; fossil commit -m "c1"
31
32 ###############################################################################
33
34 set env(TH1_ENABLE_HOOKS) 1; # TH1 hooks must be enabled for this test.
35
--- test/th1-repo.test
+++ test/th1-repo.test
@@ -25,11 +25,11 @@
2525
2626
########################################
2727
# Setup: Add Files and Commit #
2828
########################################
2929
30
-repo_init; set rootDir [file normalize [pwd]]
30
+test_setup; set rootDir [file normalize [pwd]]
3131
3232
write_file f1.md "f1"
3333
write_file f2.md "f2"
3434
write_file f3.txt "f3"
3535
write_file f4.md "f4"
3636
--- test/th1-repo.test
+++ test/th1-repo.test
@@ -25,11 +25,11 @@
25
26 ########################################
27 # Setup: Add Files and Commit #
28 ########################################
29
30 repo_init; set rootDir [file normalize [pwd]]
31
32 write_file f1.md "f1"
33 write_file f2.md "f2"
34 write_file f3.txt "f3"
35 write_file f4.md "f4"
36
--- test/th1-repo.test
+++ test/th1-repo.test
@@ -25,11 +25,11 @@
25
26 ########################################
27 # Setup: Add Files and Commit #
28 ########################################
29
30 test_setup; set rootDir [file normalize [pwd]]
31
32 write_file f1.md "f1"
33 write_file f2.md "f2"
34 write_file f3.txt "f3"
35 write_file f4.md "f4"
36
--- test/th1-tcl.test
+++ test/th1-tcl.test
@@ -20,11 +20,11 @@
2020
2121
set dir [file dirname [info script]]
2222
2323
###############################################################################
2424
25
-repo_init
25
+test_setup
2626
2727
###############################################################################
2828
2929
fossil test-th-eval "hasfeature tcl"
3030
3131
--- test/th1-tcl.test
+++ test/th1-tcl.test
@@ -20,11 +20,11 @@
20
21 set dir [file dirname [info script]]
22
23 ###############################################################################
24
25 repo_init
26
27 ###############################################################################
28
29 fossil test-th-eval "hasfeature tcl"
30
31
--- test/th1-tcl.test
+++ test/th1-tcl.test
@@ -20,11 +20,11 @@
20
21 set dir [file dirname [info script]]
22
23 ###############################################################################
24
25 test_setup
26
27 ###############################################################################
28
29 fossil test-th-eval "hasfeature tcl"
30
31
+1 -1
--- test/th1.test
+++ test/th1.test
@@ -16,11 +16,11 @@
1616
############################################################################
1717
#
1818
# TH1 Commands
1919
#
2020
21
-set dir [file dirname [info script]]; repo_init
21
+set dir [file dirname [info script]]; test_setup
2222
2323
###############################################################################
2424
2525
set th1Tcl [is_tcl_usable_by_fossil]
2626
set th1Hooks [are_th1_hooks_usable_by_fossil]
2727
--- test/th1.test
+++ test/th1.test
@@ -16,11 +16,11 @@
16 ############################################################################
17 #
18 # TH1 Commands
19 #
20
21 set dir [file dirname [info script]]; repo_init
22
23 ###############################################################################
24
25 set th1Tcl [is_tcl_usable_by_fossil]
26 set th1Hooks [are_th1_hooks_usable_by_fossil]
27
--- test/th1.test
+++ test/th1.test
@@ -16,11 +16,11 @@
16 ############################################################################
17 #
18 # TH1 Commands
19 #
20
21 set dir [file dirname [info script]]; test_setup
22
23 ###############################################################################
24
25 set th1Tcl [is_tcl_usable_by_fossil]
26 set th1Hooks [are_th1_hooks_usable_by_fossil]
27
+1 -1
--- test/utf.test
+++ test/utf.test
@@ -16,11 +16,11 @@
1616
############################################################################
1717
#
1818
# Test UTF-8/UTF-16 detection
1919
#
2020
21
-repo_init ""
21
+test_setup ""
2222
2323
proc swap_byte_order {str} {
2424
set result ""
2525
for {set i 0} {$i < [string length $str]} {incr i} {
2626
set c [scan [string index $str $i] %c]
2727
--- test/utf.test
+++ test/utf.test
@@ -16,11 +16,11 @@
16 ############################################################################
17 #
18 # Test UTF-8/UTF-16 detection
19 #
20
21 repo_init ""
22
23 proc swap_byte_order {str} {
24 set result ""
25 for {set i 0} {$i < [string length $str]} {incr i} {
26 set c [scan [string index $str $i] %c]
27
--- test/utf.test
+++ test/utf.test
@@ -16,11 +16,11 @@
16 ############################################################################
17 #
18 # Test UTF-8/UTF-16 detection
19 #
20
21 test_setup ""
22
23 proc swap_byte_order {str} {
24 set result ""
25 for {set i 0} {$i < [string length $str]} {incr i} {
26 set c [scan [string index $str $i] %c]
27

Keyboard Shortcuts

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