Sha256: 7219fafd3c829ee9b1934f77f3623b541ad90c74796e81c6ab13f828130bd1cb

Contents?: true

Size: 1.03 KB

Versions: 112

Compression:

Stored size: 1.03 KB

Contents

#!/usr/bin/env bats

@test 'April 25th, 2011' {
  # this is used to skip the test
  # normally, we skip every test except for the first one
  # (the first one is always commented out)
  # this allows for a person to focus on solving a test at a time
  # you can comment out or delete the `skip` to run the test when ready
  #skip
  run bash gigasecond.sh '2011-04-25Z'

  [ "$status" -eq 0 ]
  [ "$output" == 'Thu Jan 1 01:46:40 UTC 2043' ]
}

@test 'June 13th, 1977' {
  skip
  run bash gigasecond.sh '1977-06-13Z'

  [ "$status" -eq 0 ]
  [ "$output" == 'Thu Feb 19 01:46:40 UTC 2009' ]
}

@test 'July 19th, 1959' {
  skip
  run bash gigasecond.sh '1959-07-19Z'

  [ "$status" -eq 0 ]
  [ "$output" == 'Wed Mar 27 01:46:40 UTC 1991' ]
}

@test 'Time specified' {
  skip
  run bash gigasecond.sh '2015-01-24 22:00:00Z'

  [ "$status" -eq 0 ]
  [ "$output" == 'Tue Oct 2 23:46:40 UTC 2046' ]
}

@test 'Time with day rollover' {
  skip
  run bash gigasecond.sh '2015-01-24 23:59:59Z'

  [ "$status" -eq 0 ]
  [ "$output" == 'Wed Oct 3 01:46:39 UTC 2046' ]
}

Version data entries

112 entries across 112 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.179 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.178 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.177 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.176 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.175 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.174 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.173 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.172 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.171 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.170 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.169 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.167 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.166 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.165 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.164 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.163 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.162 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.161 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.160 tracks/bash/exercises/gigasecond/gigasecond_test.sh