Skip to content

Commit

Permalink
add: test
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronaut committed Oct 8, 2024
1 parent f8c407d commit 86c7c76
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions test/test_diffdir.bats
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,30 @@ teardown() {
echo "Hello Earth!" > /tmp/dest/hello
run diffdir /tmp/src /tmp/dest
assert_failure
}

@test "diff 01" {
mkdir -p /tmp/src/src /tmp/dest/dest
echo "Hello World!" > /tmp/src/hello
echo "Hello World!" > /tmp/dest/hello
run diffdir /tmp/src /tmp/dest
assert_failure
}

@test "diff 02" {
mkdir -p /tmp/src /tmp/dest
echo "Hello World!" > /tmp/src/hello
echo "Hello World!" > /tmp/dest/hello
echo "Bye World!" > /tmp/dest/bye
run diffdir /tmp/src /tmp/dest
assert_failure
}

@test "diff 03" {
mkdir -p /tmp/src /tmp/dest
echo "Hello World!" > /tmp/src/hello
echo "Bye World!" > /tmp/src/bye
echo "Hello World!" > /tmp/dest/hello
run diffdir /tmp/src /tmp/dest
assert_failure
}

0 comments on commit 86c7c76

Please sign in to comment.