This PR adds a feature to the testing framework to run a test with specific command line arguments, and also to check the exit code.
This is done by adding a file named commandLine.txt to the folder of the specific test, which contains a single line. The line starts with an integer (the expected exit code), followed by the arguments to be run; all separated by spaces.
For instance, take the following commandLine.txt:
0 -definelabel testlabel 0x123456 test.asm
This will run ARMIPS as if you ran it from the command line as follows:
Then, it will compare output as normal (expected.txt, expected.bin), and in addition, it will also check that the exit code is 0 as specified at the start of the commandLine.txt.
If a commandLine.txt file is not provided for a specific test case, that test case is ran just as it was before.
This PR also adds a test which uses this feature, namely one for the -definelabel argument. This test fails as-is, but with the fix from #159, it passes.
This PR adds a feature to the testing framework to run a test with specific command line arguments, and also to check the exit code.
This is done by adding a file named
commandLine.txt
to the folder of the specific test, which contains a single line. The line starts with an integer (the expected exit code), followed by the arguments to be run; all separated by spaces.For instance, take the following
commandLine.txt
:This will run ARMIPS as if you ran it from the command line as follows:
Then, it will compare output as normal (
expected.txt
,expected.bin
), and in addition, it will also check that the exit code is0
as specified at the start of thecommandLine.txt
.If a
commandLine.txt
file is not provided for a specific test case, that test case is ran just as it was before.This PR also adds a test which uses this feature, namely one for the
-definelabel
argument. This test fails as-is, but with the fix from #159, it passes.