Skip to content

Commit

Permalink
Add testing on -c omission, and locality
Browse files Browse the repository at this point in the history
  • Loading branch information
amaterasu- committed Nov 30, 2016
1 parent 61b9738 commit ec6f09e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions t/default.bats
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,16 @@ LOCKFILE=`mktemp -t flock.XXXXXXXXXX`
[ "$result" = 0.00 ]
}

# Ensure -c may be provided
@test "-c may be provided" {
result=$(${FLOCK} ${LOCKFILE} -c echo run)
[ "$result" = run ]
}

# Ensure -c position correct if provided
@test "-c must be provided after lock args and lockfile" {
${FLOCK} -c echo 1 ${LOCKFILE} || true
}

# special file types
@test "lock on existing file" {
Expand Down

0 comments on commit ec6f09e

Please sign in to comment.