Fossil

Check-in [3b691ce9]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Correct and enhance tests.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3b691ce90c8f7264104dcea9d5074e2d409dfd7e
User & Date: mistachkin 2015-10-21 21:06:58
Context
2015-10-22
11:36
Cherry-pick unrelated comment fixes from "pending_review" branch. check-in: c1c8d728 user: jan.nijtmans tags: trunk
11:30
Merge trunk. Almost forgot about this one. Please review. Closed-Leaf check-in: af7de966 user: jan.nijtmans tags: exec-rel-paths
2015-10-21
21:06
Correct and enhance tests. check-in: 3b691ce9 user: mistachkin tags: trunk
20:39
Add the 'encode64' command to TH1. check-in: 3f21421a user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/th1.test.

859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
....
1251
1252
1253
1254
1255
1256
1257
1258
1259













#
# NOTE: This test may fail if the command names do not always come
#       out in a deterministic order from TH1.
#
fossil test-th-eval "info commands"
test th1-info-commands-1 {$RESULT eq {linecount htmlize date stime\
enable_output uplevel dir http expr glob_match utime styleFooter catch if\
tclReady searchable reinitialize combobox lindex query html anoncap randhex\
llength for set break regexp markdown styleHeader puts return checkout\
decorate artifact trace wiki proc hascap globalState continue getParameter\
hasfeature setting lsearch breakpoint upvar render repository string unset\
setParameter list error info rename anycap httpize}}

###############################################################################

fossil test-th-eval "info vars"
................................................................................
###############################################################################

fossil test-th-eval {encode64 test}
test th1-encode64-1 {$RESULT eq "dGVzdA=="}

###############################################################################

fossil test-th-eval {encode64 test\0}
test th1-encode64-2 {$RESULT eq "dGVzdAA="}



















|
|
|







 







|

>
>
>
>
>
>
>
>
>
>
>
>
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
....
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271

#
# NOTE: This test may fail if the command names do not always come
#       out in a deterministic order from TH1.
#
fossil test-th-eval "info commands"
test th1-info-commands-1 {$RESULT eq {linecount htmlize date stime\
enable_output uplevel dir http expr glob_match utime styleFooter encode64\
catch if tclReady searchable reinitialize combobox lindex query html anoncap\
randhex llength for set break regexp markdown styleHeader puts return checkout\
decorate artifact trace wiki proc hascap globalState continue getParameter\
hasfeature setting lsearch breakpoint upvar render repository string unset\
setParameter list error info rename anycap httpize}}

###############################################################################

fossil test-th-eval "info vars"
................................................................................
###############################################################################

fossil test-th-eval {encode64 test}
test th1-encode64-1 {$RESULT eq "dGVzdA=="}

###############################################################################

fossil test-th-eval {encode64 test\x00}
test th1-encode64-2 {$RESULT eq "dGVzdAA="}

###############################################################################

#
# TODO: Modify the result of this test if the source file (i.e.
#       "ajax/cgi-bin/fossil-json.cgi.example") changes.
#
fossil test-th-eval --open-config \
    {encode64 [artifact trunk ajax/cgi-bin/fossil-json.cgi.example]}

test th1-encode64-3 {$RESULT eq \
"IyEvcGF0aC90by9mb3NzaWwvYmluYXJ5CnJlcG9zaXRvcnk6IC9wYXRoL3RvL3JlcG8uZnNsCg=="}