diff --git a/.gitignore b/.gitignore index 3289163..f3c3d7e 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ Cargo.lock funzzy* tests/integration/workdir/ *.log +tests/integration/release/ diff --git a/Makefile b/Makefile index 2ea1b74..6b42ad5 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,7 @@ build: tests ## Execute all the tests and build funzzy binary .PHONY: integration-cleanup integration-cleanup: rm -rf target && \ + rm -rf tests/integration/release && \ rm -rf tests/integration/workdir && \ rm -f tests/integration/funzzy diff --git a/tests/integration/runner.sh b/tests/integration/runner.sh index 855cd79..4c0301b 100644 --- a/tests/integration/runner.sh +++ b/tests/integration/runner.sh @@ -9,14 +9,9 @@ export WORKDIR="$TEST_DIR"/workdir echo "Building funzzy" rm -f "$TEST_DIR"/funzzy -# if CI build with --release flag else build with debug flag -if [ -n "$CI" ]; then - cargo build --release --target-dir "$TEST_DIR" - cp "$TEST_DIR"/release/funzzy "$TEST_DIR"/funzzy -else - cargo build --release --target-dir "$TEST_DIR" - cp "$TEST_DIR"/release/funzzy "$TEST_DIR"/funzzy -fi + +cargo build --release --target-dir "$TEST_DIR" +cp "$TEST_DIR"/release/funzzy "$TEST_DIR"/funzzy "$TEST_DIR"/funzzy --version "$TEST_DIR"/funzzy --help diff --git a/tests/integration/specs/list-of-commands-task-test.sh b/tests/integration/specs/list-of-commands-task-test.sh index 63f2a20..1923ca0 100644 --- a/tests/integration/specs/list-of-commands-task-test.sh +++ b/tests/integration/specs/list-of-commands-task-test.sh @@ -44,6 +44,6 @@ sh -c "vi +%s/test/foo/g +wq $WORKDIR/test.txt -u NONE" assert_file_contains "$WORKDIR/output.txt" "task echo 100" assert_file_contains "$WORKDIR/output.txt" "task echo 200" assert_file_contains "$WORKDIR/output.txt" "task echo 4000" -assert_file_content_at "$WORKDIR/output.txt" "3333" 7 +assert_file_content_at "$WORKDIR/output.txt" "3333" 10 cleanup