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/framework.sh | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100755 src/tests/framework.sh (limited to 'src/tests/framework.sh') diff --git a/src/tests/framework.sh b/src/tests/framework.sh deleted file mode 100755 index d6b7854..0000000 --- a/src/tests/framework.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -# $1 is the number of total tests -function plan { - TESTS=$1 - FAILED=0 - CUR_TEST=1 - - echo "1..$TESTS" -} - -function conclude { - if [ $FAILED -ne 0 ]; then - exit 1 - fi -} - -# $1 is the value to be tested -function ok { - if [ $1 -eq 0 ]; then - echo "ok $CUR_TEST" - else - echo "not ok $CUR_TEST" - FAILED=$((FAILED + 1)) - fi - - CUR_TEST=$((CUR_TEST + 1)) -} - -# $1 is the expected value -# $2 is the actual value -function is { - if [ "$1" = "$2" ]; then - echo "ok $CUR_TEST" - else - echo "not ok $CUR_TEST - expected '$1', but got '$2'" - FAILED=$((FAILED + 1)) - fi - - CUR_TEST=$((CUR_TEST + 1)) -} -- cgit v1.2.3