Fossil SCM
Merge updates from trunk. Add tests.
Commit
334f518c5f58b0d5d2b9d5374e81c050fef20469
Parent
59d80134ff5d9e0…
4 files changed
+25
+25
+13
-1
+2
-3
+25
| --- test/comment.test | ||
| +++ test/comment.test | ||
| @@ -54,5 +54,30 @@ | ||
| 54 | 54 | |
| 55 | 55 | ############################################################################### |
| 56 | 56 | |
| 57 | 57 | fossil test-comment-format --decode "" "this\\sis\\sa\\sshort\\scomment." 26 |
| 58 | 58 | test comment-8 {$RESULT eq "this is a short comment.\n(1 lines output)"} |
| 59 | + | |
| 60 | +############################################################################### | |
| 61 | + | |
| 62 | +fossil test-comment-format --decode "HH:MM:SS " "this is a long comment that should span multiple lines if the test is working correctly." 78 | |
| 63 | +test comment-9 {$RESULT eq "HH:MM:SS this is a long comment that should span multiple lines if the test is\n working correctly.\n(2 lines output)"} | |
| 64 | + | |
| 65 | +############################################################################### | |
| 66 | + | |
| 67 | +fossil test-comment-format --decode "HH:MM:SS " "this is a long comment that should span multiple lines if the test is working correctly. more text here describing the issue.\\nanother line here..................................................................................*" 78 | |
| 68 | +test comment-10 {$RESULT eq "HH:MM:SS this is a long comment that should span multiple lines if the test is\n working correctly. more text here describing the issue.\n another line here....................................................\n ..............................*\n(4 lines output)"} | |
| 69 | + | |
| 70 | +############################################################################### | |
| 71 | + | |
| 72 | +fossil test-comment-format "HH:MM:SS " "....................................................................................*" 78 | |
| 73 | +test comment-11 {$RESULT eq "HH:MM:SS .....................................................................\n ...............*\n(2 lines output)"} | |
| 74 | + | |
| 75 | +############################################################################### | |
| 76 | + | |
| 77 | +fossil test-comment-format "HH:MM:SS " ".....................................................................*" 78 | |
| 78 | +test comment-12 {$RESULT eq "HH:MM:SS .....................................................................\n *\n(2 lines output)"} | |
| 79 | + | |
| 80 | +############################################################################### | |
| 81 | + | |
| 82 | +fossil test-comment-format "*TEST* " "this\tis a test." 26 | |
| 83 | +test comment-13 {$RESULT eq "*TEST* this\tis a te\n st.\n(2 lines output)"} | |
| 59 | 84 |
| --- test/comment.test | |
| +++ test/comment.test | |
| @@ -54,5 +54,30 @@ | |
| 54 | |
| 55 | ############################################################################### |
| 56 | |
| 57 | fossil test-comment-format --decode "" "this\\sis\\sa\\sshort\\scomment." 26 |
| 58 | test comment-8 {$RESULT eq "this is a short comment.\n(1 lines output)"} |
| 59 |
| --- test/comment.test | |
| +++ test/comment.test | |
| @@ -54,5 +54,30 @@ | |
| 54 | |
| 55 | ############################################################################### |
| 56 | |
| 57 | fossil test-comment-format --decode "" "this\\sis\\sa\\sshort\\scomment." 26 |
| 58 | test comment-8 {$RESULT eq "this is a short comment.\n(1 lines output)"} |
| 59 | |
| 60 | ############################################################################### |
| 61 | |
| 62 | fossil test-comment-format --decode "HH:MM:SS " "this is a long comment that should span multiple lines if the test is working correctly." 78 |
| 63 | test comment-9 {$RESULT eq "HH:MM:SS this is a long comment that should span multiple lines if the test is\n working correctly.\n(2 lines output)"} |
| 64 | |
| 65 | ############################################################################### |
| 66 | |
| 67 | fossil test-comment-format --decode "HH:MM:SS " "this is a long comment that should span multiple lines if the test is working correctly. more text here describing the issue.\\nanother line here..................................................................................*" 78 |
| 68 | test comment-10 {$RESULT eq "HH:MM:SS this is a long comment that should span multiple lines if the test is\n working correctly. more text here describing the issue.\n another line here....................................................\n ..............................*\n(4 lines output)"} |
| 69 | |
| 70 | ############################################################################### |
| 71 | |
| 72 | fossil test-comment-format "HH:MM:SS " "....................................................................................*" 78 |
| 73 | test comment-11 {$RESULT eq "HH:MM:SS .....................................................................\n ...............*\n(2 lines output)"} |
| 74 | |
| 75 | ############################################################################### |
| 76 | |
| 77 | fossil test-comment-format "HH:MM:SS " ".....................................................................*" 78 |
| 78 | test comment-12 {$RESULT eq "HH:MM:SS .....................................................................\n *\n(2 lines output)"} |
| 79 | |
| 80 | ############################################################################### |
| 81 | |
| 82 | fossil test-comment-format "*TEST* " "this\tis a test." 26 |
| 83 | test comment-13 {$RESULT eq "*TEST* this\tis a te\n st.\n(2 lines output)"} |
| 84 |
+25
| --- test/comment.test | ||
| +++ test/comment.test | ||
| @@ -54,5 +54,30 @@ | ||
| 54 | 54 | |
| 55 | 55 | ############################################################################### |
| 56 | 56 | |
| 57 | 57 | fossil test-comment-format --decode "" "this\\sis\\sa\\sshort\\scomment." 26 |
| 58 | 58 | test comment-8 {$RESULT eq "this is a short comment.\n(1 lines output)"} |
| 59 | + | |
| 60 | +############################################################################### | |
| 61 | + | |
| 62 | +fossil test-comment-format --decode "HH:MM:SS " "this is a long comment that should span multiple lines if the test is working correctly." 78 | |
| 63 | +test comment-9 {$RESULT eq "HH:MM:SS this is a long comment that should span multiple lines if the test is\n working correctly.\n(2 lines output)"} | |
| 64 | + | |
| 65 | +############################################################################### | |
| 66 | + | |
| 67 | +fossil test-comment-format --decode "HH:MM:SS " "this is a long comment that should span multiple lines if the test is working correctly. more text here describing the issue.\\nanother line here..................................................................................*" 78 | |
| 68 | +test comment-10 {$RESULT eq "HH:MM:SS this is a long comment that should span multiple lines if the test is\n working correctly. more text here describing the issue.\n another line here....................................................\n ..............................*\n(4 lines output)"} | |
| 69 | + | |
| 70 | +############################################################################### | |
| 71 | + | |
| 72 | +fossil test-comment-format "HH:MM:SS " "....................................................................................*" 78 | |
| 73 | +test comment-11 {$RESULT eq "HH:MM:SS .....................................................................\n ...............*\n(2 lines output)"} | |
| 74 | + | |
| 75 | +############################################################################### | |
| 76 | + | |
| 77 | +fossil test-comment-format "HH:MM:SS " ".....................................................................*" 78 | |
| 78 | +test comment-12 {$RESULT eq "HH:MM:SS .....................................................................\n *\n(2 lines output)"} | |
| 79 | + | |
| 80 | +############################################################################### | |
| 81 | + | |
| 82 | +fossil test-comment-format "*TEST* " "this\tis a test." 26 | |
| 83 | +test comment-13 {$RESULT eq "*TEST* this\tis a te\n st.\n(2 lines output)"} | |
| 59 | 84 |
| --- test/comment.test | |
| +++ test/comment.test | |
| @@ -54,5 +54,30 @@ | |
| 54 | |
| 55 | ############################################################################### |
| 56 | |
| 57 | fossil test-comment-format --decode "" "this\\sis\\sa\\sshort\\scomment." 26 |
| 58 | test comment-8 {$RESULT eq "this is a short comment.\n(1 lines output)"} |
| 59 |
| --- test/comment.test | |
| +++ test/comment.test | |
| @@ -54,5 +54,30 @@ | |
| 54 | |
| 55 | ############################################################################### |
| 56 | |
| 57 | fossil test-comment-format --decode "" "this\\sis\\sa\\sshort\\scomment." 26 |
| 58 | test comment-8 {$RESULT eq "this is a short comment.\n(1 lines output)"} |
| 59 | |
| 60 | ############################################################################### |
| 61 | |
| 62 | fossil test-comment-format --decode "HH:MM:SS " "this is a long comment that should span multiple lines if the test is working correctly." 78 |
| 63 | test comment-9 {$RESULT eq "HH:MM:SS this is a long comment that should span multiple lines if the test is\n working correctly.\n(2 lines output)"} |
| 64 | |
| 65 | ############################################################################### |
| 66 | |
| 67 | fossil test-comment-format --decode "HH:MM:SS " "this is a long comment that should span multiple lines if the test is working correctly. more text here describing the issue.\\nanother line here..................................................................................*" 78 |
| 68 | test comment-10 {$RESULT eq "HH:MM:SS this is a long comment that should span multiple lines if the test is\n working correctly. more text here describing the issue.\n another line here....................................................\n ..............................*\n(4 lines output)"} |
| 69 | |
| 70 | ############################################################################### |
| 71 | |
| 72 | fossil test-comment-format "HH:MM:SS " "....................................................................................*" 78 |
| 73 | test comment-11 {$RESULT eq "HH:MM:SS .....................................................................\n ...............*\n(2 lines output)"} |
| 74 | |
| 75 | ############################################################################### |
| 76 | |
| 77 | fossil test-comment-format "HH:MM:SS " ".....................................................................*" 78 |
| 78 | test comment-12 {$RESULT eq "HH:MM:SS .....................................................................\n *\n(2 lines output)"} |
| 79 | |
| 80 | ############################################################################### |
| 81 | |
| 82 | fossil test-comment-format "*TEST* " "this\tis a test." 26 |
| 83 | test comment-13 {$RESULT eq "*TEST* this\tis a te\n st.\n(2 lines output)"} |
| 84 |
+13
-1
| --- test/tester.tcl | ||
| +++ test/tester.tcl | ||
| @@ -41,10 +41,18 @@ | ||
| 41 | 41 | set PROT 1 |
| 42 | 42 | set argv [lreplace $argv $i $i] |
| 43 | 43 | } else { |
| 44 | 44 | set PROT 0 |
| 45 | 45 | } |
| 46 | + | |
| 47 | +set i [lsearch $argv -verbose] | |
| 48 | +if {$i>=0} { | |
| 49 | + set VERBOSE 1 | |
| 50 | + set argv [lreplace $argv $i $i] | |
| 51 | +} else { | |
| 52 | + set VERBOSE 0 | |
| 53 | +} | |
| 46 | 54 | |
| 47 | 55 | if {[llength $argv]==0} { |
| 48 | 56 | foreach f [lsort [glob $testdir/*.test]] { |
| 49 | 57 | set base [file root [file tail $f]] |
| 50 | 58 | lappend argv $base |
| @@ -93,11 +101,15 @@ | ||
| 93 | 101 | |
| 94 | 102 | flush stdout |
| 95 | 103 | set rc [catch {eval exec $cmd} result] |
| 96 | 104 | global RESULT CODE |
| 97 | 105 | set CODE $rc |
| 98 | - if {$rc} {protOut "ERROR: $result"} | |
| 106 | + if {$rc} { | |
| 107 | + protOut "ERROR: $result" | |
| 108 | + } elseif {$::VERBOSE} { | |
| 109 | + protOut "RESULT: $result" | |
| 110 | + } | |
| 99 | 111 | set RESULT $result |
| 100 | 112 | } |
| 101 | 113 | |
| 102 | 114 | # Read a file into memory. |
| 103 | 115 | # |
| 104 | 116 |
| --- test/tester.tcl | |
| +++ test/tester.tcl | |
| @@ -41,10 +41,18 @@ | |
| 41 | set PROT 1 |
| 42 | set argv [lreplace $argv $i $i] |
| 43 | } else { |
| 44 | set PROT 0 |
| 45 | } |
| 46 | |
| 47 | if {[llength $argv]==0} { |
| 48 | foreach f [lsort [glob $testdir/*.test]] { |
| 49 | set base [file root [file tail $f]] |
| 50 | lappend argv $base |
| @@ -93,11 +101,15 @@ | |
| 93 | |
| 94 | flush stdout |
| 95 | set rc [catch {eval exec $cmd} result] |
| 96 | global RESULT CODE |
| 97 | set CODE $rc |
| 98 | if {$rc} {protOut "ERROR: $result"} |
| 99 | set RESULT $result |
| 100 | } |
| 101 | |
| 102 | # Read a file into memory. |
| 103 | # |
| 104 |
| --- test/tester.tcl | |
| +++ test/tester.tcl | |
| @@ -41,10 +41,18 @@ | |
| 41 | set PROT 1 |
| 42 | set argv [lreplace $argv $i $i] |
| 43 | } else { |
| 44 | set PROT 0 |
| 45 | } |
| 46 | |
| 47 | set i [lsearch $argv -verbose] |
| 48 | if {$i>=0} { |
| 49 | set VERBOSE 1 |
| 50 | set argv [lreplace $argv $i $i] |
| 51 | } else { |
| 52 | set VERBOSE 0 |
| 53 | } |
| 54 | |
| 55 | if {[llength $argv]==0} { |
| 56 | foreach f [lsort [glob $testdir/*.test]] { |
| 57 | set base [file root [file tail $f]] |
| 58 | lappend argv $base |
| @@ -93,11 +101,15 @@ | |
| 101 | |
| 102 | flush stdout |
| 103 | set rc [catch {eval exec $cmd} result] |
| 104 | global RESULT CODE |
| 105 | set CODE $rc |
| 106 | if {$rc} { |
| 107 | protOut "ERROR: $result" |
| 108 | } elseif {$::VERBOSE} { |
| 109 | protOut "RESULT: $result" |
| 110 | } |
| 111 | set RESULT $result |
| 112 | } |
| 113 | |
| 114 | # Read a file into memory. |
| 115 | # |
| 116 |
+2
-3
| --- www/makefile.wiki | ||
| +++ www/makefile.wiki | ||
| @@ -42,13 +42,12 @@ | ||
| 42 | 42 | The sqlite3.c and sqlite3.h source files are byte-for-byte copies of a |
| 43 | 43 | standard [http://www.sqlite.org/amalgamation.html | amalgamation]. |
| 44 | 44 | The shell.c source file is code for the SQLite |
| 45 | 45 | [http://www.sqlite.org/sqlite.html | command-line shell] that is used |
| 46 | 46 | to help implement the [/help/sqlite3 | fossil sql] command. The |
| 47 | -shell.c source file has been modified slightly from the standard | |
| 48 | -shell.c file in the SQLite release. Search for "Fossil Patch" in | |
| 49 | -the shell.c source file of Fossil to see the changes. | |
| 47 | +shell.c source file is also a byte-for-byte copy of the | |
| 48 | +shell.c file from the SQLite release. | |
| 50 | 49 | |
| 51 | 50 | The TH1 script engine is implemented using files: |
| 52 | 51 | |
| 53 | 52 | 7. th.c |
| 54 | 53 | 8. th.h |
| 55 | 54 |
| --- www/makefile.wiki | |
| +++ www/makefile.wiki | |
| @@ -42,13 +42,12 @@ | |
| 42 | The sqlite3.c and sqlite3.h source files are byte-for-byte copies of a |
| 43 | standard [http://www.sqlite.org/amalgamation.html | amalgamation]. |
| 44 | The shell.c source file is code for the SQLite |
| 45 | [http://www.sqlite.org/sqlite.html | command-line shell] that is used |
| 46 | to help implement the [/help/sqlite3 | fossil sql] command. The |
| 47 | shell.c source file has been modified slightly from the standard |
| 48 | shell.c file in the SQLite release. Search for "Fossil Patch" in |
| 49 | the shell.c source file of Fossil to see the changes. |
| 50 | |
| 51 | The TH1 script engine is implemented using files: |
| 52 | |
| 53 | 7. th.c |
| 54 | 8. th.h |
| 55 |
| --- www/makefile.wiki | |
| +++ www/makefile.wiki | |
| @@ -42,13 +42,12 @@ | |
| 42 | The sqlite3.c and sqlite3.h source files are byte-for-byte copies of a |
| 43 | standard [http://www.sqlite.org/amalgamation.html | amalgamation]. |
| 44 | The shell.c source file is code for the SQLite |
| 45 | [http://www.sqlite.org/sqlite.html | command-line shell] that is used |
| 46 | to help implement the [/help/sqlite3 | fossil sql] command. The |
| 47 | shell.c source file is also a byte-for-byte copy of the |
| 48 | shell.c file from the SQLite release. |
| 49 | |
| 50 | The TH1 script engine is implemented using files: |
| 51 | |
| 52 | 7. th.c |
| 53 | 8. th.h |
| 54 |