reading is fun

This commit is contained in:
Scarlett
2025-05-06 21:22:39 -04:00
parent b1296ddd02
commit 9633e32281

View File

@ -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 <file.alpha> [flags] Run the test on a single file
./test.sh <directory> [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: [ <test_flags> ] *)
where <test_flags> are the alpha flags to be used. Ex:
(* TEST: [ -debug -asc -tc ] *)
## Lexical Analyzer
* **Undefined Behavior:**