From a78c52265d755a2294a743e186ad5a6b5456d9f1 Mon Sep 17 00:00:00 2001 From: kartofen Date: Fri, 28 Apr 2023 20:39:42 +0300 Subject: testing structure done --- src/tests/test1.sh | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'src/tests/test1.sh') diff --git a/src/tests/test1.sh b/src/tests/test1.sh index 52c2ba3..a432e5f 100755 --- a/src/tests/test1.sh +++ b/src/tests/test1.sh @@ -1,12 +1,11 @@ #!/bin/sh - -. ./framework.sh - -plan 2 - -is "$(cat /proc/_test_module)" "You have no previous messages" - -echo kek > /proc/_test_module -is "$(cat /proc/_test_module)" "Your last message was: kek" - +. libs/testing-library + +description "Test _test_module" +plan 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" conclude -- cgit v1.2.3