From f473b9d725545153a779694106b0f41b23cf0f5e Mon Sep 17 00:00:00 2001 From: ahmedsamyh Date: Mon, 18 Nov 2024 20:53:12 +0500 Subject: [PATCH] Remove test.sh from tracking. --- .gitignore | 1 + test.sh | 41 ----------------------------------------- 2 files changed, 1 insertion(+), 41 deletions(-) create mode 100644 .gitignore delete mode 100755 test.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..73d41de --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +test.sh diff --git a/test.sh b/test.sh deleted file mode 100755 index afdde63..0000000 --- a/test.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -TESTS_DIR=./tests/ - -test_file_exists() { - filename=$1 - testfilename=$filename.test - - # TODO: Maybe create the test file with the current output - if [ ! -f "$testfilename" ]; then - echo "ERROR: test file \"$testfilename\" doesn't exist!" - exit 1 - fi -} - -test_source_file() { - filename=$1 - - if [ ! -f "$filename" ]; then - echo "ERROR: File \"$filename\" doesn't exist!" - exit 1 - fi - - test_file_exists $filename - - printf "INFO: Testing file \"$filename\"... " - - output=$(python3 main.py $filename) - expected_output=$(cat $filename.test) - if [ "$output" != "$expected_output" ]; then - echo "Failed!" - echo "Expected: \`$expected_output\`" - echo "Got: \`$output\`" - else - echo "Success!" - fi -} - -# set -xe - -test_source_file tests/01-unterminated-string.momo -- 2.39.5