Fossil SCM
Fixed isses in the JSON and wiki test cases exposed by regressions in fossil-2.0.
Commit
5ee57d84b07781a9dbe1d70d2559c25c00d054a8
Parent
1d407cff32978b6…
2 files changed
+4
-4
+12
-6
+4
-4
| --- test/json.test | ||
| +++ test/json.test | ||
| @@ -749,14 +749,14 @@ | ||
| 749 | 749 | |
| 750 | 750 | |
| 751 | 751 | # FOSSIL-1103 FSL_JSON_E_UNKNOWN |
| 752 | 752 | # Unknown error |
| 753 | 753 | |
| 754 | -write_file bad.sql { | |
| 755 | -CREATE TABLE spam(a integer, b text); | |
| 756 | -} | |
| 757 | -exec $::fossilexe sqlite3 --no-repository bad.fossil <bad.sql | |
| 754 | +#write_file bad.sql { | |
| 755 | +#CREATE TABLE spam(a integer, b text); | |
| 756 | +#} | |
| 757 | +#exec $::fossilexe sqlite3 --no-repository bad.fossil <bad.sql | |
| 758 | 758 | #fossil_json HAI -R bad.fossil -expectError |
| 759 | 759 | |
| 760 | 760 | # FOSSIL-1104 FSL_JSON_E_TIMEOUT |
| 761 | 761 | # Timeout reached |
| 762 | 762 | # FOSSIL-1105 FSL_JSON_E_ASSERT |
| 763 | 763 |
| --- test/json.test | |
| +++ test/json.test | |
| @@ -749,14 +749,14 @@ | |
| 749 | |
| 750 | |
| 751 | # FOSSIL-1103 FSL_JSON_E_UNKNOWN |
| 752 | # Unknown error |
| 753 | |
| 754 | write_file bad.sql { |
| 755 | CREATE TABLE spam(a integer, b text); |
| 756 | } |
| 757 | exec $::fossilexe sqlite3 --no-repository bad.fossil <bad.sql |
| 758 | #fossil_json HAI -R bad.fossil -expectError |
| 759 | |
| 760 | # FOSSIL-1104 FSL_JSON_E_TIMEOUT |
| 761 | # Timeout reached |
| 762 | # FOSSIL-1105 FSL_JSON_E_ASSERT |
| 763 |
| --- test/json.test | |
| +++ test/json.test | |
| @@ -749,14 +749,14 @@ | |
| 749 | |
| 750 | |
| 751 | # FOSSIL-1103 FSL_JSON_E_UNKNOWN |
| 752 | # Unknown error |
| 753 | |
| 754 | #write_file bad.sql { |
| 755 | #CREATE TABLE spam(a integer, b text); |
| 756 | #} |
| 757 | #exec $::fossilexe sqlite3 --no-repository bad.fossil <bad.sql |
| 758 | #fossil_json HAI -R bad.fossil -expectError |
| 759 | |
| 760 | # FOSSIL-1104 FSL_JSON_E_TIMEOUT |
| 761 | # Timeout reached |
| 762 | # FOSSIL-1105 FSL_JSON_E_ASSERT |
| 763 |
+12
-6
| --- test/wiki.test | ||
| +++ test/wiki.test | ||
| @@ -21,16 +21,22 @@ | ||
| 21 | 21 | test_setup |
| 22 | 22 | |
| 23 | 23 | # Return true if two files are similar (i.e. not only compress trailing spaces |
| 24 | 24 | # from a line, but remove any final LF from the file as well) |
| 25 | 25 | proc similar_file {a b} { |
| 26 | - set x [read_file $a] | |
| 27 | - regsub -all { +\n} $x \n x | |
| 28 | - regsub -all {\n$} $x {} x | |
| 29 | - set y [read_file $b] | |
| 30 | - regsub -all { +\n} $y \n y | |
| 31 | - regsub -all {\n$} $y {} y | |
| 26 | + set x "" | |
| 27 | + if {[file exists $a]} { | |
| 28 | + set x [read_file $a] | |
| 29 | + regsub -all { +\n} $x \n x | |
| 30 | + regsub -all {\n$} $x {} x | |
| 31 | + } | |
| 32 | + set y "" | |
| 33 | + if {[file exists $b]} { | |
| 34 | + set y [read_file $b] | |
| 35 | + regsub -all { +\n} $y \n y | |
| 36 | + regsub -all {\n$} $y {} y | |
| 37 | + } | |
| 32 | 38 | return [expr {$x==$y}] |
| 33 | 39 | } |
| 34 | 40 | |
| 35 | 41 | # Return the mime type in the manifest for a given wiki page |
| 36 | 42 | # Defaults to "error: some text" if the manifest can't be located and |
| 37 | 43 |
| --- test/wiki.test | |
| +++ test/wiki.test | |
| @@ -21,16 +21,22 @@ | |
| 21 | test_setup |
| 22 | |
| 23 | # Return true if two files are similar (i.e. not only compress trailing spaces |
| 24 | # from a line, but remove any final LF from the file as well) |
| 25 | proc similar_file {a b} { |
| 26 | set x [read_file $a] |
| 27 | regsub -all { +\n} $x \n x |
| 28 | regsub -all {\n$} $x {} x |
| 29 | set y [read_file $b] |
| 30 | regsub -all { +\n} $y \n y |
| 31 | regsub -all {\n$} $y {} y |
| 32 | return [expr {$x==$y}] |
| 33 | } |
| 34 | |
| 35 | # Return the mime type in the manifest for a given wiki page |
| 36 | # Defaults to "error: some text" if the manifest can't be located and |
| 37 |
| --- test/wiki.test | |
| +++ test/wiki.test | |
| @@ -21,16 +21,22 @@ | |
| 21 | test_setup |
| 22 | |
| 23 | # Return true if two files are similar (i.e. not only compress trailing spaces |
| 24 | # from a line, but remove any final LF from the file as well) |
| 25 | proc similar_file {a b} { |
| 26 | set x "" |
| 27 | if {[file exists $a]} { |
| 28 | set x [read_file $a] |
| 29 | regsub -all { +\n} $x \n x |
| 30 | regsub -all {\n$} $x {} x |
| 31 | } |
| 32 | set y "" |
| 33 | if {[file exists $b]} { |
| 34 | set y [read_file $b] |
| 35 | regsub -all { +\n} $y \n y |
| 36 | regsub -all {\n$} $y {} y |
| 37 | } |
| 38 | return [expr {$x==$y}] |
| 39 | } |
| 40 | |
| 41 | # Return the mime type in the manifest for a given wiki page |
| 42 | # Defaults to "error: some text" if the manifest can't be located and |
| 43 |