diff options
| author | Dave Henderson <dhenderson@gmail.com> | 2017-10-31 10:26:21 -0400 |
|---|---|---|
| committer | Dave Henderson <dhenderson@gmail.com> | 2017-11-01 21:17:30 -0400 |
| commit | 6f14f57ae4b303e486b689c0c24c376eacd4eabd (patch) | |
| tree | 2e8cef22f7aacbb76b5d28d903e384451999cfc4 /test | |
| parent | 76a17250a0d1252adb27b084b9c11df34336fe82 (diff) | |
Add time.ParseLocal function
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'test')
| -rw-r--r-- | test/integration/time.bats | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/integration/time.bats b/test/integration/time.bats index 3d91d2f6..83441f60 100644 --- a/test/integration/time.bats +++ b/test/integration/time.bats @@ -27,6 +27,18 @@ load helper [[ "${output}" == "2009-02-13 23 +0000" ]] } +@test "'(time.ParseLocal).Format'" { + TZ=Africa/Luanda gomplate -i "{{ (time.ParseLocal time.Kitchen \"6:00AM\").Format \"15:04 MST\" }}" + [ "$status" -eq 0 ] + [[ "${output}" == "06:00 LMT" ]] +} + +@test "'(time.ParseInLocation).Format'" { + gomplate -i "{{ (time.ParseInLocation time.Kitchen \"Africa/Luanda\" \"6:00AM\").Format \"15:04 MST\" }}" + [ "$status" -eq 0 ] + [[ "${output}" == "06:00 LMT" ]] +} + @test "'(time.Unix).UTC.Format' int" { gomplate -i '{{ (time.Unix 1234567890).UTC.Format "2006-01-02 15 -0700" }}' [ "$status" -eq 0 ] |
