Skip to content

Commit

Permalink
Use correct path for shunit2
Browse files Browse the repository at this point in the history
Since:
 _Note: the script as it stands expects that you are running it from the
  "examples" directory._

shunit2 is located in ../shunit2

Signed-off-by: Osamu Aoki <osamu@debian.org>
  • Loading branch information
osamuaoki committed Oct 14, 2019
1 parent cc65c1c commit 1e7c85b
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ testEquality() {
}

# Load shUnit2.
. ./shunit2
. ../shunit2
```

Running the unit test should give results similar to the following.
Expand Down Expand Up @@ -168,7 +168,7 @@ testPartyLikeItIs1999() {
}

# Load shUnit2.
. ./shunit2
. ../shunit2
```

So, what did you get? I guess it told you that this isn't 1999. Bummer, eh?
Expand All @@ -184,6 +184,15 @@ ton more examples, take a look at the tests provided with [log4sh][log4sh] or
shUnit2 was after all written to meet the unit testing need that
[log4sh][log4sh] had.

If you are using distribution packaged shUnit2 which is accessible from
`/usr/bin/shunit2` such as Debian, you can load shUnit2 without specifying its
path. So the last 2 lines in the above can be replaced by:

```sh
# Load shUnit2.
. shunit2
```

---

## <a name="function-reference"></a> Function Reference
Expand Down Expand Up @@ -460,7 +469,7 @@ testLineNo() {
}

# Load shUnit2.
. ./shunit2
. ../shunit2
```

Notes:
Expand Down Expand Up @@ -540,7 +549,7 @@ oneTimeSetUp() {
}

# Load and run shUnit2.
. ./shunit2
. ../shunit2
```

Running the above test under the __bash__ shell will result in the following
Expand Down

0 comments on commit 1e7c85b

Please sign in to comment.