Fossil SCM

Make the read-only json test work on Windows.

mistachkin 2016-02-07 23:22 trunk
Commit 938122da85336d15b7a57fe8b43fc4142938d788
1 file changed +4 -2
+4 -2
--- test/json.test
+++ test/json.test
@@ -674,17 +674,19 @@
674674
test json-ROrepo-1-1 {$CODE == 0}
675675
test json-ROrepo-1-2 {[regexp {\}\s*$} $RESULT]}
676676
test json-ROrepo-1-3 {![regexp {SQLITE_[A-Z]+:} $RESULT]}
677677
test_json_envelope_ok json-http-timeline1
678678
protOut "chmod 444 repo"
679
-catch {exec chmod 444 .rep.fossil}; # Unix. What about Win?
679
+catch {exec chmod 444 .rep.fossil}; # Unix
680
+catch {exec attrib +r .rep.fossil}; # Windows
680681
fossil_http_json /json/timeline/checkin $U1Cookie -expectError
681682
test json-ROrepo-2-1 {$CODE != 0}
682683
test json-ROrepo-2-2 {[regexp {\}\s*$} $RESULT]} knownBug
683684
test json-ROrepo-2-3 {![regexp {SQLITE_[A-Z]+:} $RESULT]} knownBug
684685
#test_json_envelope_ok json-http-timeline2
685
-catch {exec chmod 666 .rep.fossil}; # Unix. What about Win?
686
+catch {exec attrib -r .rep.fossil}; # Windows
687
+catch {exec chmod 666 .rep.fossil}; # Unix
686688
687689
688690
#### Result Codes
689691
# Test cases designed to stimulate each (documented) error code.
690692
691693
--- test/json.test
+++ test/json.test
@@ -674,17 +674,19 @@
674 test json-ROrepo-1-1 {$CODE == 0}
675 test json-ROrepo-1-2 {[regexp {\}\s*$} $RESULT]}
676 test json-ROrepo-1-3 {![regexp {SQLITE_[A-Z]+:} $RESULT]}
677 test_json_envelope_ok json-http-timeline1
678 protOut "chmod 444 repo"
679 catch {exec chmod 444 .rep.fossil}; # Unix. What about Win?
 
680 fossil_http_json /json/timeline/checkin $U1Cookie -expectError
681 test json-ROrepo-2-1 {$CODE != 0}
682 test json-ROrepo-2-2 {[regexp {\}\s*$} $RESULT]} knownBug
683 test json-ROrepo-2-3 {![regexp {SQLITE_[A-Z]+:} $RESULT]} knownBug
684 #test_json_envelope_ok json-http-timeline2
685 catch {exec chmod 666 .rep.fossil}; # Unix. What about Win?
 
686
687
688 #### Result Codes
689 # Test cases designed to stimulate each (documented) error code.
690
691
--- test/json.test
+++ test/json.test
@@ -674,17 +674,19 @@
674 test json-ROrepo-1-1 {$CODE == 0}
675 test json-ROrepo-1-2 {[regexp {\}\s*$} $RESULT]}
676 test json-ROrepo-1-3 {![regexp {SQLITE_[A-Z]+:} $RESULT]}
677 test_json_envelope_ok json-http-timeline1
678 protOut "chmod 444 repo"
679 catch {exec chmod 444 .rep.fossil}; # Unix
680 catch {exec attrib +r .rep.fossil}; # Windows
681 fossil_http_json /json/timeline/checkin $U1Cookie -expectError
682 test json-ROrepo-2-1 {$CODE != 0}
683 test json-ROrepo-2-2 {[regexp {\}\s*$} $RESULT]} knownBug
684 test json-ROrepo-2-3 {![regexp {SQLITE_[A-Z]+:} $RESULT]} knownBug
685 #test_json_envelope_ok json-http-timeline2
686 catch {exec attrib -r .rep.fossil}; # Windows
687 catch {exec chmod 666 .rep.fossil}; # Unix
688
689
690 #### Result Codes
691 # Test cases designed to stimulate each (documented) error code.
692
693

Keyboard Shortcuts

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