Fossil

Check-in [5ee57d84]
Login

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

Overview
Comment:Fixed isses in the JSON and wiki test cases exposed by regressions in fossil-2.0.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | rkb-2.0-tests
Files: files | file ages | folders
SHA1:5ee57d84b07781a9dbe1d70d2559c25c00d054a8
User & Date: rberteig 2017-03-08 20:05:13
Context
2017-03-13
21:53
Merged from trunk to verify fix in [62352847]. check-in: 4077357a user: rberteig tags: rkb-2.0-tests
2017-03-08
20:05
Fixed isses in the JSON and wiki test cases exposed by regressions in fossil-2.0. check-in: 5ee57d84 user: rberteig tags: rkb-2.0-tests
2017-03-03
12:00
Version 2.0 check-in: 1d407cff user: drh tags: trunk, release, version-2.0
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/json.test.

747
748
749
750
751
752
753
754
755
756

757
758
759
760
761
762
763
764
procTimeMs resultCode resultText} {payload}
test json-env-RC-1102-code {[dict get $JR resultCode] eq "FOSSIL-1102"}


# FOSSIL-1103 FSL_JSON_E_UNKNOWN
#     Unknown error

write_file bad.sql  {
CREATE TABLE spam(a integer, b text);
}

exec $::fossilexe sqlite3 --no-repository bad.fossil <bad.sql
#fossil_json HAI -R bad.fossil -expectError

# FOSSIL-1104 FSL_JSON_E_TIMEOUT
#     Timeout reached
# FOSSIL-1105 FSL_JSON_E_ASSERT
#     Assertion failed
# FOSSIL-1106 FSL_JSON_E_ALLOC







|
|
<
>
|







747
748
749
750
751
752
753
754
755

756
757
758
759
760
761
762
763
764
procTimeMs resultCode resultText} {payload}
test json-env-RC-1102-code {[dict get $JR resultCode] eq "FOSSIL-1102"}


# FOSSIL-1103 FSL_JSON_E_UNKNOWN
#     Unknown error

#write_file bad.sql  {
#CREATE TABLE spam(a integer, b text);

#}
#exec $::fossilexe sqlite3 --no-repository bad.fossil <bad.sql
#fossil_json HAI -R bad.fossil -expectError

# FOSSIL-1104 FSL_JSON_E_TIMEOUT
#     Timeout reached
# FOSSIL-1105 FSL_JSON_E_ASSERT
#     Assertion failed
# FOSSIL-1106 FSL_JSON_E_ALLOC

Changes to test/wiki.test.

19
20
21
22
23
24
25


26
27
28



29
30
31

32
33
34
35
36
37
38
#

test_setup

# Return true if two files are similar (i.e. not only compress trailing spaces
# from a line, but remove any final LF from the file as well)
proc similar_file {a b} {


  set x [read_file $a]
  regsub -all { +\n} $x \n x
  regsub -all {\n$} $x {} x



  set y [read_file $b]
  regsub -all { +\n} $y \n y
  regsub -all {\n$} $y {} y

  return [expr {$x==$y}]
}

# Return the mime type in the manifest for a given wiki page
# Defaults to "error: some text" if the manifest can't be located and
# "text/x-fossil-wiki" (the default mimetype for rendering)
# if the N card is omitted in the manifest.







>
>
|
|
|
>
>
>
|
|
|
>







19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#

test_setup

# Return true if two files are similar (i.e. not only compress trailing spaces
# from a line, but remove any final LF from the file as well)
proc similar_file {a b} {
  set x ""
  if {[file exists $a]} {
    set x [read_file $a]
    regsub -all { +\n} $x \n x
    regsub -all {\n$} $x {} x
  }
  set y ""
  if {[file exists $b]} {
    set y [read_file $b]
    regsub -all { +\n} $y \n y
    regsub -all {\n$} $y {} y
  }
  return [expr {$x==$y}]
}

# Return the mime type in the manifest for a given wiki page
# Defaults to "error: some text" if the manifest can't be located and
# "text/x-fossil-wiki" (the default mimetype for rendering)
# if the N card is omitted in the manifest.