File: party_test.sh

package info (click to toggle)
shunit2 2.1.8-4
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 648 kB
  • sloc: sh: 1,752; makefile: 15
file content (16 lines) | stat: -rwxr-xr-x 469 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#! /bin/sh
# file: examples/party_test.sh
#
# This test is mostly for fun. Technically, it is a bad example of a unit test
# because of the temporal requirement, namely that the year be 1999. A better
# test would have been to pass in both a known-bad and known-good year into a
# function, and test for the expected result.

testPartyLikeItIs1999() {
  year=`date '+%Y'`
  assertEquals "It's not 1999 :-(" \
      '1999' "${year}"
}

# Load and run shUnit2.
. shunit2