From 308a74b5fb5de19bb6cad0bb0905bcf2b32ee530 Mon Sep 17 00:00:00 2001 From: kevinnls Date: Wed, 14 Jan 2026 12:45:31 +0530 Subject: [PATCH] setup tests --- .gitignore | 3 +++ Justfile | 2 ++ tests/test.bats | 15 +++++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 Justfile create mode 100644 tests/test.bats diff --git a/.gitignore b/.gitignore index 567609b..4eb7cca 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ build/ +tests/** +!tests/ +!tests/*.bats diff --git a/Justfile b/Justfile new file mode 100644 index 0000000..79a878a --- /dev/null +++ b/Justfile @@ -0,0 +1,2 @@ +test +TESTS='test': + tests/bats/bin/bats {{ append('.bats',prepend('tests/',TESTS)) }} diff --git a/tests/test.bats b/tests/test.bats new file mode 100644 index 0000000..333bdf5 --- /dev/null +++ b/tests/test.bats @@ -0,0 +1,15 @@ +setup(){ + export PATH="${PWD}:${PATH}" + load 'test_helper/bats-support/load' + load 'test_helper/bats-assert/load' +} + +@test "command found" { + run command -v args + assert_output --partial args +} + +@test "no args? you fail." { + run args + assert_failure +}