diff options
author | kartofen <mladenovnasko0@gmail.com> | 2023-04-30 13:21:44 +0300 |
---|---|---|
committer | kartofen <mladenovnasko0@gmail.com> | 2023-04-30 13:21:44 +0300 |
commit | d42853496fc976ef3d067af421a1a3811660033d (patch) | |
tree | 272ece830ae755e92f715b77f632e24b1adec2d8 /src/tests | |
parent | a78c52265d755a2294a743e186ad5a6b5456d9f1 (diff) |
i am getting tired of the makefile
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(); +} |