Fossil SCM

Modify 'th1-docs' test file to enable it to run when the test suite is running outside of the Fossil source checkout.

mistachkin 2016-01-11 00:39 trunk
Commit 8f199fd8f59a5ec50d6128527aaf14d11c510bd4
1 file changed +8 -3
--- test/th1-docs.test
+++ test/th1-docs.test
@@ -35,11 +35,14 @@
3535
set env(TH1_ENABLE_DOCS) 1; # TH1 docs must be enabled for this test.
3636
set env(TH1_ENABLE_TCL) 1; # Tcl integration must be enabled for this test.
3737
3838
###############################################################################
3939
40
-set data [fossil info]
40
+run_in_checkout {
41
+ set data [fossil info]
42
+}
43
+
4144
regexp -line -- {^repository: (.*)$} $data dummy repository
4245
4346
if {[string length $repository] == 0 || ![file exists $repository]} then {
4447
error "unable to locate repository"
4548
}
@@ -46,11 +49,13 @@
4649
4750
set dataFileName [file join $::testdir th1-docs-input.txt]
4851
4952
###############################################################################
5053
51
-set RESULT [test_fossil_http \
52
- $repository $dataFileName /doc/trunk/test/fileStat.th1]
54
+run_in_checkout {
55
+ set RESULT [test_fossil_http \
56
+ $repository $dataFileName /doc/trunk/test/fileStat.th1]
57
+}
5358
5459
test th1-docs-1a {[regexp {<title>Fossil: test/fileStat.th1</title>} $RESULT]}
5560
test th1-docs-1b {[regexp {>\[[0-9a-f]{40}\]<} $RESULT]}
5661
test th1-docs-1c {[regexp { contains \d+ files\.} $RESULT]}
5762
--- test/th1-docs.test
+++ test/th1-docs.test
@@ -35,11 +35,14 @@
35 set env(TH1_ENABLE_DOCS) 1; # TH1 docs must be enabled for this test.
36 set env(TH1_ENABLE_TCL) 1; # Tcl integration must be enabled for this test.
37
38 ###############################################################################
39
40 set data [fossil info]
 
 
 
41 regexp -line -- {^repository: (.*)$} $data dummy repository
42
43 if {[string length $repository] == 0 || ![file exists $repository]} then {
44 error "unable to locate repository"
45 }
@@ -46,11 +49,13 @@
46
47 set dataFileName [file join $::testdir th1-docs-input.txt]
48
49 ###############################################################################
50
51 set RESULT [test_fossil_http \
52 $repository $dataFileName /doc/trunk/test/fileStat.th1]
 
 
53
54 test th1-docs-1a {[regexp {<title>Fossil: test/fileStat.th1</title>} $RESULT]}
55 test th1-docs-1b {[regexp {>\[[0-9a-f]{40}\]<} $RESULT]}
56 test th1-docs-1c {[regexp { contains \d+ files\.} $RESULT]}
57
--- test/th1-docs.test
+++ test/th1-docs.test
@@ -35,11 +35,14 @@
35 set env(TH1_ENABLE_DOCS) 1; # TH1 docs must be enabled for this test.
36 set env(TH1_ENABLE_TCL) 1; # Tcl integration must be enabled for this test.
37
38 ###############################################################################
39
40 run_in_checkout {
41 set data [fossil info]
42 }
43
44 regexp -line -- {^repository: (.*)$} $data dummy repository
45
46 if {[string length $repository] == 0 || ![file exists $repository]} then {
47 error "unable to locate repository"
48 }
@@ -46,11 +49,13 @@
49
50 set dataFileName [file join $::testdir th1-docs-input.txt]
51
52 ###############################################################################
53
54 run_in_checkout {
55 set RESULT [test_fossil_http \
56 $repository $dataFileName /doc/trunk/test/fileStat.th1]
57 }
58
59 test th1-docs-1a {[regexp {<title>Fossil: test/fileStat.th1</title>} $RESULT]}
60 test th1-docs-1b {[regexp {>\[[0-9a-f]{40}\]<} $RESULT]}
61 test th1-docs-1c {[regexp { contains \d+ files\.} $RESULT]}
62

Keyboard Shortcuts

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