Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | The changes in [b045d0774ed48936] are too far reaching. Instead, add a -keepNewline option and use it where appropriate. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
561402f2e08045d8e47cdd02ef5bb569 |
| User & Date: | mistachkin 2016-10-05 08:10:05.610 |
Context
|
2016-10-05
| ||
| 08:21 | Modify expected results for one of the TH1 hooks tests to account for the changes in [274e537bb064db9d]. ... (check-in: 6c1359d367 user: mistachkin tags: trunk) | |
| 08:10 | The changes in [b045d0774ed48936] are too far reaching. Instead, add a -keepNewline option and use it where appropriate. ... (check-in: 561402f2e0 user: mistachkin tags: trunk) | |
| 06:40 | The 'manifest' setting still needs to be marked as 'versionable'. ... (check-in: 3604802d55 user: mistachkin tags: trunk) | |
Changes
Changes to test/json.test.
| ︙ | ︙ | |||
21 22 23 24 25 26 27 | # Make sure we have a build with the json command at all and that it # is not stubbed out. This assumes the current (as of 2016-01-27) # practice of eliminating all trace of the fossil json command when # not configured. If that changes, these conditions might not prevent # the rest of this file from running. fossil test-th-eval "hasfeature json" | | | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# Make sure we have a build with the json command at all and that it
# is not stubbed out. This assumes the current (as of 2016-01-27)
# practice of eliminating all trace of the fossil json command when
# not configured. If that changes, these conditions might not prevent
# the rest of this file from running.
fossil test-th-eval "hasfeature json"
if {[normalize_result] ne "1"} then {
puts "Fossil was not compiled with JSON support."
test_cleanup_then_return
}
# We need a JSON parser to effectively test the JSON produced by
# fossil. It looks like the one from tcllib is exactly what we need.
# On ActiveTcl, add it with teacup. On other platforms, YMMV.
|
| ︙ | ︙ |
Changes to test/tester.tcl.
| ︙ | ︙ | |||
134 135 136 137 138 139 140 |
# Sets the CODE and RESULT global variables for use in
# test expressions.
#
proc fossil_maybe_answer {answer args} {
global fossilexe
set cmd $fossilexe
set expectError 0
| | > | > > > > > > > | > > > > | > > > | 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 |
# Sets the CODE and RESULT global variables for use in
# test expressions.
#
proc fossil_maybe_answer {answer args} {
global fossilexe
set cmd $fossilexe
set expectError 0
set index [lsearch -exact $args -expectError]
if {$index != -1} {
set expectError 1
set args [lreplace $args $index $index]
}
set keepNewline 0
set index [lsearch -exact $args -keepNewline]
if {$index != -1} {
set keepNewline 1
set args [lreplace $args $index $index]
}
foreach a $args {
lappend cmd $a
}
protOut $cmd
flush stdout
if {[string length $answer] > 0} {
protOut $answer
set prompt_file [file join $::tempPath fossil_prompt_answer]
write_file $prompt_file $answer\n
if {$keepNewline} {
set rc [catch {eval exec -keepnewline $cmd <$prompt_file} result]
} else {
set rc [catch {eval exec $cmd <$prompt_file} result]
}
file delete $prompt_file
} else {
if {$keepNewline} {
set rc [catch {eval exec -keepnewline $cmd} result]
} else {
set rc [catch {eval exec $cmd} result]
}
}
global RESULT CODE
set CODE $rc
if {($rc && !$expectError) || (!$rc && $expectError)} {
protOut "ERROR: $result" 1
} elseif {$::VERBOSE} {
protOut "RESULT: $result"
|
| ︙ | ︙ |
Changes to test/th1-docs.test.
| ︙ | ︙ | |||
16 17 18 19 20 21 22 | ############################################################################ # # TH1 Docs # fossil test-th-eval "hasfeature th1Docs" | | | | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
############################################################################
#
# TH1 Docs
#
fossil test-th-eval "hasfeature th1Docs"
if {[normalize_result] ne "1"} {
puts "Fossil was not compiled with TH1 docs support."
test_cleanup_then_return
}
fossil test-th-eval "hasfeature tcl"
if {[normalize_result] ne "1"} {
puts "Fossil was not compiled with Tcl support."
test_cleanup_then_return
}
###############################################################################
test_setup ""
|
| ︙ | ︙ |
Changes to test/th1-hooks.test.
| ︙ | ︙ | |||
16 17 18 19 20 21 22 | ############################################################################ # # TH1 Hooks # fossil test-th-eval "hasfeature th1Hooks" | | | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
############################################################################
#
# TH1 Hooks
#
fossil test-th-eval "hasfeature th1Hooks"
if {[normalize_result] ne "1"} {
puts "Fossil was not compiled with TH1 hooks support."
test_cleanup_then_return
}
###############################################################################
test_setup
|
| ︙ | ︙ |
Changes to test/th1-tcl.test.
| ︙ | ︙ | |||
20 21 22 23 24 25 26 | set path [file dirname [info script]] ############################################################################### fossil test-th-eval "hasfeature tcl" | | | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
set path [file dirname [info script]]
###############################################################################
fossil test-th-eval "hasfeature tcl"
if {[normalize_result] ne "1"} {
puts "Fossil was not compiled with Tcl support."
test_cleanup_then_return
}
###############################################################################
test_setup
|
| ︙ | ︙ |
Changes to test/unversioned.test.
| ︙ | ︙ | |||
176 177 178 179 180 181 182 |
fossil unversioned cat unversioned2.txt
test unversioned-23 {[::sha1::sha1 $RESULT] eq \
{962f96ebd613e4fdd9aa2d20bd9fe21a64e925f2}}
###############################################################################
| | | 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
fossil unversioned cat unversioned2.txt
test unversioned-23 {[::sha1::sha1 $RESULT] eq \
{962f96ebd613e4fdd9aa2d20bd9fe21a64e925f2}}
###############################################################################
fossil unversioned cat unversioned3.txt -keepNewline
test unversioned-24 {[::sha1::sha1 $RESULT] eq \
{c6b95509120d9703cc4fbe5cdfcb435b5912b3e4}}
###############################################################################
fossil unversioned rm unversioned3.txt
test unversioned-25 {[normalize_result] eq {}}
|
| ︙ | ︙ |