Sha256: 9f345b2c16a72305c938db0390dae98f332629ab48e7b0c8254312093d6b748f

Contents?: true

Size: 747 Bytes

Versions: 268

Compression:

Stored size: 747 Bytes

Contents

#!/usr/bin/env bats

@test 'April 25th, 2011' {
  run bash gigasecond.sh '2011-04-25Z'

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

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

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

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

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

@test 'Time specified' {
  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' {
  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

268 entries across 268 versions & 1 rubygems

Version Path
trackler-2.2.1.66 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.65 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.64 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.63 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.62 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.61 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.60 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.59 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.58 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.57 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.56 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.55 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.54 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.53 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.52 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.51 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.50 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.49 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.48 tracks/bash/exercises/gigasecond/gigasecond_test.sh
trackler-2.2.1.47 tracks/bash/exercises/gigasecond/gigasecond_test.sh