Skip to content

Commit

Permalink
add tests for dates
Browse files Browse the repository at this point in the history
before we start mangling the date functions
  • Loading branch information
alandekok committed Aug 20, 2019
1 parent 49dc457 commit f96bb53
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/tests/unit/all.mk
Expand Up @@ -55,6 +55,12 @@ $(OUTPUT):
#
FILES.$(TEST) := $(addprefix $(OUTPUT),$(notdir $(FILES)))

#
# We use GMT for the tests, so that local time zones don't affect
# the test outputs.
#
$(FILES.$(TEST)): export TZ = GMT

#
# The output files also depend on the directory
# and on the previous test.
Expand Down
21 changes: 21 additions & 0 deletions src/tests/unit/data_types.txt
Expand Up @@ -52,3 +52,24 @@ data -128

int8 -130
data ERROR parsing value: Value -130 is invalid for type int8 (must be in range -128...127)

date Jan 1 1970 12:00:00 GMT
data Jan 1 1970 12:00:00 GMT

#
# 10 days in
#
date 864000
data Jan 11 1970 00:00:00 GMT

# 100 days
date 8640000
data Apr 11 1970 00:00:00 GMT

# 1,000 days
date 86400000
data Sep 27 1972 00:00:00 GMT

# 10,000 days
date 864000000
data May 19 1997 00:00:00 GMT

0 comments on commit f96bb53

Please sign in to comment.