karolbelina / uxntal-test-suite

Test suite for the Uxntal programming language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🚧 Work in progress! 🚧

uxntal-test-suite

Test suite for the Uxntal programming language, intended to be ran by various test runners for testing various Uxntal assemblers. Its primary purpose is to make sure that the source code is treated the same, and the same output is produced, regardless of the Uxntal assembler used in the process.

Structure

.
β”œβ”€β”€ test1
β”‚   β”œβ”€β”€ input.tal
β”‚   └── output.rom
β”œβ”€β”€ subdirectory
β”‚   β”œβ”€β”€ test2
β”‚   β”‚   β”œβ”€β”€ input.tal
β”‚   β”‚   β”œβ”€β”€ included.tal
β”‚   β”‚   └── output.rom
β”‚   β”œβ”€β”€ test3
β”‚   β”‚   └── input.tal
β”‚   └── test4
β”‚       β”œβ”€β”€ input.tal
β”‚       └── explanation.txt
└── index

Every directory with an input.tal file is a valid test case. The input.tal file should be passed as an input to the tested assembler. If the output.rom file is present in the same directory, it should be compared with the actual output of the assembler. If there is no output.rom file in the same directory, the test case expects no output β€” possibly because of an error, or specifically a non-zero exit code from the assembler.

The test case directory can contain more than one .tal file in case they are included (directly or indirectly) in the input.tal file with Uxntal's include keyword. Besides .tal files and the output.rom file, the test case directory can contain other files which should be ignored by the test runner.

.tal files are regular plain text files. output.rom files are binary files and are meant to be viewed and edited in hex editors. The rationale behind keeping expected output as a binary file instead of a serialized plain text file is the ease of comparing the actual and expected output byte by byte without the need of serializing or deserializing anything.

The index file at the root of the repository contains paths to every test case directory. Its primary purpose is for listing all the test cases on systems that have no way of reading the contents of directories (e.g. Varvara). At the same time, all systems can simply read the index file without the need to walk the directories recursively.

Contributing

I appreciate your help!

To contribute, please read the contributing instructions.

License

This software is licensed under the MIT license.

See the LICENSE file for more details.

About

Test suite for the Uxntal programming language

License:MIT License


Languages

Language:Shell 100.0%