Commits

Sebastian Freundt committed cbc5f5e Merge

Merge branch 'test/general'

* test/general:
test, add more dtest tests (from README)
test, add more dadd/tadd/dtadd tests (from README)
test, add more ddiff tests (from README)
test, add more dtdiff tests (from README)
test, add strptime tests (from README)

Comments (0)

Files changed (17)

 dt_tests += dadd.21.dt
 dt_tests += dadd.22.dt
 dt_tests += dadd.23.dt
+dt_tests += dadd.24.dt
+dt_tests += dadd.25.dt
+dt_tests += dadd.26.dt
 
 dt_tests += dtest.1.dt
 dt_tests += dtest.2.dt
 dt_tests += dtest.3.dt
 dt_tests += dtest.4.dt
 dt_tests += dtest.5.dt
+dt_tests += dtest.6.dt
+dt_tests += dtest.7.dt
+dt_tests += dtest.8.dt
+dt_tests += dtest.9.dt
 
 dt_tests += ddiff.1.dt
 dt_tests += ddiff.2.dt
 dt_tests += ddiff.6.dt
 dt_tests += ddiff.7.dt
 dt_tests += ddiff.8.dt
+dt_tests += ddiff.9.dt
+dt_tests += ddiff.10.dt
 
 dt_tests += dgrep.1.dt
 dt_tests += dgrep.2.dt
 dt_tests += tadd.3.dt
 dt_tests += tadd.4.dt
 dt_tests += tadd.5.dt
+dt_tests += tadd.6.dt
 
 dt_tests += tgrep.1.dt
 dt_tests += tgrep.2.dt
 dt_tests += dtadd.12.dt
 dt_tests += dtadd.13.dt
 dt_tests += dtadd.14.dt
+dt_tests += dtadd.15.dt
+dt_tests += dtadd.16.dt
 
 dt_tests += dtgrep.1.dt
 dt_tests += dtgrep.2.dt
 dt_tests += dtdiff.8.dt
 dt_tests += dtdiff.9.dt
 dt_tests += dtdiff.10.dt
+dt_tests += dtdiff.11.dt
+dt_tests += dtdiff.12.dt
+
+dt_tests += strptime.1.dt
+dt_tests += strptime.2.dt
 
 check_PROGRAMS += struct-1
 check_PROGRAMS += struct-2
+## -*- shell-script -*-
+
+TOOL=dadd
+CMDLINE="2010-02-02 +4d"
+
+## STDIN
+
+## STDOUT
+stdout=$(mktemp "/tmp/tmp.XXXXXXXXXX")
+cat > "${stdout}" <<EOF
+2010-02-06
+EOF
+
+## STDERR
+
+## dadd.24.dt ends here
+## -*- shell-script -*-
+
+TOOL=dadd
+CMDLINE="2010-02-02 +1w"
+
+## STDIN
+
+## STDOUT
+stdout=$(mktemp "/tmp/tmp.XXXXXXXXXX")
+cat > "${stdout}" <<EOF
+2010-02-09
+EOF
+
+## STDERR
+
+## dadd.25.dt ends here
+## -*- shell-script -*-
+
+TOOL=dadd
+CMDLINE="-1d"
+
+## STDIN
+stdin=$(mktemp "/tmp/tmp.XXXXXXXXXX")
+cat > "${stdin}" <<EOF
+2001-01-05
+2001-01-01
+EOF
+
+## STDOUT
+stdout=$(mktemp "/tmp/tmp.XXXXXXXXXX")
+cat > "${stdout}" <<EOF
+2001-01-04
+2000-12-31
+EOF
+
+## STDERR
+
+## dadd.26.dt ends here
+## -*- shell-script -*-
+
+TOOL=ddiff
+CMDLINE="2001-02-08 2001-03-09 -f \"%m month and %d day\""
+
+## STDIN
+
+## STDOUT
+stdout=$(mktemp "/tmp/tmp.XXXXXXXXXX")
+cat > "${stdout}" <<EOF
+1 month and 1 day
+EOF
+
+## STDERR
+
+## ddiff.10.dt ends here
+## -*- shell-script -*-
+
+TOOL=ddiff
+CMDLINE="2001-02-08 2001-03-02"
+
+## STDIN
+
+## STDOUT
+stdout=$(mktemp "/tmp/tmp.XXXXXXXXXX")
+cat > "${stdout}" <<EOF
+22
+EOF
+
+## STDERR
+
+## ddiff.9.dt ends here
+## -*- shell-script -*-
+
+TOOL=dadd
+CMDLINE="2012-03-12T12:05:00 -1d4h"
+
+## STDIN
+
+## STDOUT
+stdout=$(mktemp "/tmp/tmp.XXXXXXXXXX")
+cat > "${stdout}" <<EOF
+2012-03-11T08:05:00
+EOF
+
+## STDERR
+
+## dtadd.15.dt ends here
+## -*- shell-script -*-
+
+TOOL=dadd
+CMDLINE="-1d4h"
+
+## STDIN
+stdin=$(mktemp "/tmp/tmp.XXXXXXXXXX")
+cat > "${stdin}" <<EOF
+2012-03-12T12:05:00
+EOF
+
+## STDOUT
+stdout=$(mktemp "/tmp/tmp.XXXXXXXXXX")
+cat > "${stdout}" <<EOF
+2012-03-11T08:05:00
+EOF
+
+## STDERR
+
+## dtadd.15.dt ends here

test/dtdiff.11.dt

+## -*- shell-script -*-
+
+TOOL=ddiff
+CMDLINE="2012-03-01T12:17:00 2012-03-02T14:00:00"
+
+## STDIN
+
+## STDOUT
+stdout=$(mktemp "/tmp/tmp.XXXXXXXXXX")
+cat > "${stdout}" <<EOF
+92580s
+EOF
+
+## STDERR
+
+## dtdiff.11.dt ends here

test/dtdiff.12.dt

+## -*- shell-script -*-
+
+TOOL=ddiff
+CMDLINE="2012-03-01T12:17:00 2012-03-02T14:00:00 -f '%d days and %S seconds'"
+
+## STDIN
+
+## STDOUT
+stdout=$(mktemp "/tmp/tmp.XXXXXXXXXX")
+cat > "${stdout}" <<EOF
+1 days and 6180 seconds
+EOF
+
+## STDERR
+
+## dtdiff.12.dt ends here
+## -*- shell-script -*-
+
+TOOL=dtest
+CMDLINE="today --gt 2010-01-01 && echo \"yes\""
+
+## STDIN
+
+## STDOUT
+stdout=$(mktemp "/tmp/tmp.XXXXXXXXXX")
+cat > "${stdout}" <<EOF
+yes
+EOF
+
+## STDERR
+
+## dtest.6.dt ends here
+## -*- shell-script -*-
+
+TOOL=dtest
+CMDLINE="now --gt 2010-01-01 && echo \"yes\""
+
+## STDIN
+
+## STDOUT
+stdout=$(mktemp "/tmp/tmp.XXXXXXXXXX")
+cat > "${stdout}" <<EOF
+yes
+EOF
+
+## STDERR
+
+## dtest.7.dt ends here
+## -*- shell-script -*-
+
+TOOL=dtest
+CMDLINE="today --gt 2010-01-01T12:34:56 && echo \"yes\""
+
+## STDIN
+
+## STDOUT
+stdout=$(mktemp "/tmp/tmp.XXXXXXXXXX")
+cat > "${stdout}" <<EOF
+yes
+EOF
+
+## STDERR
+
+## dtest.8.dt ends here
+## -*- shell-script -*-
+
+TOOL=dtest
+CMDLINE="now --gt 2010-01-01T12:34:56 && echo \"yes\""
+
+## STDIN
+
+## STDOUT
+stdout=$(mktemp "/tmp/tmp.XXXXXXXXXX")
+cat > "${stdout}" <<EOF
+yes
+EOF
+
+## STDERR
+
+## dtest.9.dt ends here

test/strptime.1.dt

+## -*- shell-script -*-
+
+TOOL=strptime
+CMDLINE="-i '%a, %b-%d/%Y' 'Mon, May-01/2000'"
+
+## STDIN
+
+## STDOUT
+stdout=$(mktemp "/tmp/tmp.XXXXXXXXXX")
+cat > "${stdout}" <<EOF
+2000-05-01
+EOF
+
+## strptime.1.dt ends here

test/strptime.2.dt

+## -*- shell-script -*-
+
+TOOL=strptime
+CMDLINE="-i '%a, %b-%d/%Y'"
+
+## STDIN
+stdin=$(mktemp "/tmp/tmp.XXXXXXXXXX")
+cat > "${stdin}" <<EOF
+Mon, May-01/2000
+Mon, Mar-2/2000
+EOF
+
+## STDOUT
+stdout=$(mktemp "/tmp/tmp.XXXXXXXXXX")
+cat > "${stdout}" <<EOF
+2000-05-01
+2000-03-02
+EOF
+
+## strptime.2.dt ends here
+## -*- shell-script -*-
+
+TOOL=dadd
+CMDLINE="12:05:00 +10m"
+
+## STDIN
+
+## STDOUT
+stdout=$(mktemp "/tmp/tmp.XXXXXXXXXX")
+cat > "${stdout}" <<EOF
+12:15:00
+EOF
+
+## STDERR
+
+## tadd.6.dt ends here
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.