From d42853496fc976ef3d067af421a1a3811660033d Mon Sep 17 00:00:00 2001 From: kartofen Date: Sun, 30 Apr 2023 13:21:44 +0300 Subject: i am getting tired of the makefile --- src/tests/test1.sh | 4 ++-- src/tests/test2.c | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 src/tests/test2.c (limited to 'src/tests') 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(); +} -- cgit v1.2.3