From 9633e322817048e16f6566de8348bd6a7a9addb2 Mon Sep 17 00:00:00 2001 From: Scarlett Date: Tue, 6 May 2025 21:22:39 -0400 Subject: [PATCH] reading is fun --- README.MD | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.MD b/README.MD index f8dc6f9..953df72 100644 --- a/README.MD +++ b/README.MD @@ -27,6 +27,36 @@ Prints debug messages to the console if present. Our debug messages utilizes a w Prints a general help message. (If you read this far, you probably won't need this flag) +## Testing + + **Arguments:** + -exp Generate expected output files + -diff Compare output files with expected output files + -help Show this help message + + **Usage:** + ./test.sh [flags] Run the test on a single file + ./test.sh [flags] Run the test on all files in a directory + + **Examples:** + - ./test.sh test.alpha + - - Runs test flags in header on test.alpha + - ./test.sh test/ + - - Runs test flags in header on all .alpha files in test/ + - ./test.sh test/ -exp + - - Runs test flags in header on all .alpha files in test/ and generates expected output files + - ./test.sh test/ -diff + - - Runs test flags in header on all .alpha files in test/ and compares output files with expected output files +- ./test.sh test/ -exp -diff +- - Runs test flags in header on all .alpha files in test/ and generates expected output files and compares output files with expected output files + + **Notes:** + To create a test file, on the first line of the .alpha file, add: + (* TEST: [ ] *) + where are the alpha flags to be used. Ex: + (* TEST: [ -debug -asc -tc ] *) + + ## Lexical Analyzer * **Undefined Behavior:**