Fossil SCM

Add test for -date option.

andybradford 2015-07-31 07:33 UTC check-in-edit
Commit f2748b45353c0ed7d5f495ebb8180b592f0299f6
1 file changed +14
--- test/amend.test
+++ test/amend.test
@@ -101,5 +101,19 @@
101101
test amend-author-1.1 {[string match {*comment:*(user:*author-test)*} $RESULT]}
102102
fossil tag ls --raw $UUID
103103
test amend-author-1.2 {[string first "user=author-test" $RESULT] != -1}
104104
fossil timeline -n 1
105105
test amend-author-1.3 {[string match {*Change*user*to*"author-test".*} $RESULT]}
106
+
107
+########################################
108
+# Test: -date #
109
+########################################
110
+set timestamp [clock scan yesterday]
111
+set date [clock format $timestamp -format "%Y-%m-%d" -gmt 1]
112
+set time [clock format $timestamp -format "%H:%M:%S" -gmt 1]
113
+set datetime "$date $time"
114
+fossil amend $UUID -date $datetime
115
+test amend-date-1.1 {[string match "*uuid:*$UUID*$datetime*" $RESULT]}
116
+fossil tag ls --raw $UUID
117
+test amend-date-1.2 {[string first "date=$datetime" $RESULT] != -1}
118
+fossil timeline -n 1
119
+test amend-date-1.3 {[string match "*Timestamp*$date*$time*" $RESULT]}
106120
--- test/amend.test
+++ test/amend.test
@@ -101,5 +101,19 @@
101 test amend-author-1.1 {[string match {*comment:*(user:*author-test)*} $RESULT]}
102 fossil tag ls --raw $UUID
103 test amend-author-1.2 {[string first "user=author-test" $RESULT] != -1}
104 fossil timeline -n 1
105 test amend-author-1.3 {[string match {*Change*user*to*"author-test".*} $RESULT]}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
--- test/amend.test
+++ test/amend.test
@@ -101,5 +101,19 @@
101 test amend-author-1.1 {[string match {*comment:*(user:*author-test)*} $RESULT]}
102 fossil tag ls --raw $UUID
103 test amend-author-1.2 {[string first "user=author-test" $RESULT] != -1}
104 fossil timeline -n 1
105 test amend-author-1.3 {[string match {*Change*user*to*"author-test".*} $RESULT]}
106
107 ########################################
108 # Test: -date #
109 ########################################
110 set timestamp [clock scan yesterday]
111 set date [clock format $timestamp -format "%Y-%m-%d" -gmt 1]
112 set time [clock format $timestamp -format "%H:%M:%S" -gmt 1]
113 set datetime "$date $time"
114 fossil amend $UUID -date $datetime
115 test amend-date-1.1 {[string match "*uuid:*$UUID*$datetime*" $RESULT]}
116 fossil tag ls --raw $UUID
117 test amend-date-1.2 {[string first "date=$datetime" $RESULT] != -1}
118 fossil timeline -n 1
119 test amend-date-1.3 {[string match "*Timestamp*$date*$time*" $RESULT]}
120

Keyboard Shortcuts

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