diff options
Diffstat (limited to 'src/tests')
-rwxr-xr-x | src/tests/test1.sh | 4 | ||||
-rw-r--r-- | src/tests/test2.c | 13 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/tests/test1.sh b/src/tests/test1.sh index a432e5f..5ac52d8 100755 --- a/src/tests/test1.sh +++ b/src/tests/test1.sh @@ -1,5 +1,5 @@ #!/bin/sh -. libs/testing-library +. include/test-util.sh description "Test _test_module" plan 5 @@ -7,5 +7,5 @@ is "$(cat /proc/_test_module)" "You have no previous messages" "No message read" ok $(echo kek > /proc/_test_module; echo "$?") "Successful write" is "$(cat /proc/_test_module)" "Your last message was: kek" "Message read" ok $(echo something > /proc/_test_module; echo "$?") "Successful write" -is "$(cat /proc/_test_module)" "Your last message was: kek" "Message read" +is "$(cat /proc/_test_module)" "Your last message was: something" "Message read" conclude diff --git a/src/tests/test2.c b/src/tests/test2.c new file mode 100644 index 0000000..dc24f28 --- /dev/null +++ b/src/tests/test2.c @@ -0,0 +1,13 @@ +#include "test-util.h" + +int main(void) +{ + description("Test _test_module in c"); + plan(3); + + ok(0, "test something"); + is_s("kek", "kek", "test kek"); + is_i(1, 1, "test 1"); + + return conclude(); +} |