Fossil

Check-in [f2748b45]
Login

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

Overview
Comment:Add test for -date option.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | check-in-edit
Files: files | file ages | folders
SHA1: f2748b45353c0ed7d5f495ebb8180b592f0299f6
User & Date: andybradford 2015-07-31 07:33:13
Context
2015-08-01
01:47
Add test for newly added code that checks the datetime format is correct. check-in: 3740d83f user: andybradford tags: check-in-edit
2015-07-31
07:33
Add test for -date option. check-in: f2748b45 user: andybradford tags: check-in-edit
07:22
Check that the date provided will actually come back out of the database before allowing it in. Also, allow altering a date or user that may be wrong. check-in: 44fda322 user: andybradford tags: check-in-edit
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/amend.test.

99
100
101
102
103
104
105














########################################
fossil amend $UUID -author author-test
test amend-author-1.1 {[string match {*comment:*(user:*author-test)*} $RESULT]}
fossil tag ls --raw $UUID
test amend-author-1.2 {[string first "user=author-test" $RESULT] != -1}
fossil timeline -n 1
test amend-author-1.3 {[string match {*Change*user*to*"author-test".*} $RESULT]}





















>
>
>
>
>
>
>
>
>
>
>
>
>
>
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
########################################
fossil amend $UUID -author author-test
test amend-author-1.1 {[string match {*comment:*(user:*author-test)*} $RESULT]}
fossil tag ls --raw $UUID
test amend-author-1.2 {[string first "user=author-test" $RESULT] != -1}
fossil timeline -n 1
test amend-author-1.3 {[string match {*Change*user*to*"author-test".*} $RESULT]}

########################################
# Test: -date                          #
########################################
set timestamp [clock scan yesterday]
set date [clock format $timestamp -format "%Y-%m-%d" -gmt 1]
set time [clock format $timestamp -format "%H:%M:%S" -gmt 1]
set datetime "$date $time"
fossil amend $UUID -date $datetime
test amend-date-1.1 {[string match "*uuid:*$UUID*$datetime*" $RESULT]}
fossil tag ls --raw $UUID
test amend-date-1.2 {[string first "date=$datetime" $RESULT] != -1}
fossil timeline -n 1
test amend-date-1.3 {[string match "*Timestamp*$date*$time*" $RESULT]}