Fossil SCM

Fixed isses in the JSON and wiki test cases exposed by regressions in fossil-2.0.

rberteig 2017-03-08 20:05 trunk
Commit 5ee57d84b07781a9dbe1d70d2559c25c00d054a8
2 files changed +4 -4 +12 -6
+4 -4
--- test/json.test
+++ test/json.test
@@ -749,14 +749,14 @@
749749
750750
751751
# FOSSIL-1103 FSL_JSON_E_UNKNOWN
752752
# Unknown error
753753
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
758758
#fossil_json HAI -R bad.fossil -expectError
759759
760760
# FOSSIL-1104 FSL_JSON_E_TIMEOUT
761761
# Timeout reached
762762
# FOSSIL-1105 FSL_JSON_E_ASSERT
763763
--- 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 @@
2121
test_setup
2222
2323
# Return true if two files are similar (i.e. not only compress trailing spaces
2424
# from a line, but remove any final LF from the file as well)
2525
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
+ }
3238
return [expr {$x==$y}]
3339
}
3440
3541
# Return the mime type in the manifest for a given wiki page
3642
# Defaults to "error: some text" if the manifest can't be located and
3743
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button