Fossil SCM
Modify 'th1-docs' test file to enable it to run when the test suite is running outside of the Fossil source checkout.
Commit
8f199fd8f59a5ec50d6128527aaf14d11c510bd4
Parent
03fb7bf97b24e2d…
1 file changed
+8
-3
+8
-3
| --- test/th1-docs.test | ||
| +++ test/th1-docs.test | ||
| @@ -35,11 +35,14 @@ | ||
| 35 | 35 | set env(TH1_ENABLE_DOCS) 1; # TH1 docs must be enabled for this test. |
| 36 | 36 | set env(TH1_ENABLE_TCL) 1; # Tcl integration must be enabled for this test. |
| 37 | 37 | |
| 38 | 38 | ############################################################################### |
| 39 | 39 | |
| 40 | -set data [fossil info] | |
| 40 | +run_in_checkout { | |
| 41 | + set data [fossil info] | |
| 42 | +} | |
| 43 | + | |
| 41 | 44 | regexp -line -- {^repository: (.*)$} $data dummy repository |
| 42 | 45 | |
| 43 | 46 | if {[string length $repository] == 0 || ![file exists $repository]} then { |
| 44 | 47 | error "unable to locate repository" |
| 45 | 48 | } |
| @@ -46,11 +49,13 @@ | ||
| 46 | 49 | |
| 47 | 50 | set dataFileName [file join $::testdir th1-docs-input.txt] |
| 48 | 51 | |
| 49 | 52 | ############################################################################### |
| 50 | 53 | |
| 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 | +} | |
| 53 | 58 | |
| 54 | 59 | test th1-docs-1a {[regexp {<title>Fossil: test/fileStat.th1</title>} $RESULT]} |
| 55 | 60 | test th1-docs-1b {[regexp {>\[[0-9a-f]{40}\]<} $RESULT]} |
| 56 | 61 | test th1-docs-1c {[regexp { contains \d+ files\.} $RESULT]} |
| 57 | 62 |
| --- 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 |