Fossil SCM
Add test for -date option.
Commit
f2748b45353c0ed7d5f495ebb8180b592f0299f6
Parent
44fda3228b18d6f…
1 file changed
+14
+14
| --- test/amend.test | ||
| +++ test/amend.test | ||
| @@ -101,5 +101,19 @@ | ||
| 101 | 101 | test amend-author-1.1 {[string match {*comment:*(user:*author-test)*} $RESULT]} |
| 102 | 102 | fossil tag ls --raw $UUID |
| 103 | 103 | test amend-author-1.2 {[string first "user=author-test" $RESULT] != -1} |
| 104 | 104 | fossil timeline -n 1 |
| 105 | 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]} | |
| 106 | 120 |
| --- 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 |