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/libs/testing-library | 53 ------------------------------------------------ 1 file changed, 53 deletions(-) delete mode 100755 src/libs/testing-library (limited to 'src/libs/testing-library') diff --git a/src/libs/testing-library b/src/libs/testing-library deleted file mode 100755 index a1cf3c1..0000000 --- a/src/libs/testing-library +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh - -function description { - echo "# DESCRIPTION: $1" -} - -# $1 is the number of total tests -function plan { - TESTS=$1; FAILED=0; CUR_TEST=0 - echo "1..$TESTS" -} - -function conclude { - PERC=$(echo "scale=2;100 * $FAILED / $TESTS" | bc) - echo "# CONCLUSION: ($PERC%) $FAILED out of $TESTS tests failed" - - if [ $TESTS -ne $CUR_TEST ]; then - echo -e "# expected $TESTS, but got $CUR_TEST tests" - fi - - if [ $FAILED -ne 0 ]; then - exit 1 - fi -} - -# $1 is the value to be tested -# $2 description -function ok { - CUR_TEST=$((CUR_TEST + 1)) - - if [ $1 -eq 0 ]; then - echo "ok $CUR_TEST - $2" - else - echo "not ok $CUR_TEST - $2" - echo -e " returned '$1'" - FAILED=$((FAILED + 1)) - fi -} - -# $1 is the expected value -# $2 is the actual value -# $3 description -function is { - CUR_TEST=$((CUR_TEST + 1)) - - if [ "$1" = "$2" ]; then - echo "ok $CUR_TEST - $3" - else - echo "not ok $CUR_TEST - $3" - echo -e " exptected '$2', but got '$1'" - FAILED=$((FAILED + 1)) - fi -} -- cgit v1.2.3