NAME ^

languages/abc/t/01-tests.t - test harness for Parrot abc

DESCRIPTION ^

This file is the current implementation for the abc test harness. The tests are actually in simple text files, this harness given this list of tests sources, executes all the tests.

The test source is a plain text file divided in three columns. The columns are separated by three white spaces \s{3,} or at least one tab \t+. The three columns are:

expression

The exact expression that is passed to the abc compiler as source code. This input is pasted as a double quotes delimted string into PIR code. This means that you can use \n to indicate newlines.

expected

The expected result for the compiled source. Note that you can (and probably should) use \n in the expected result to represent newlines.

description

This should be a string describing the test that is being made.

Since this is supposed to be a temporary harness. We're expecting to be able to capture the result of the compilation to write this file in PIR. The skip and todo tests are defined in the test source file itself, so that later when the harness is changed we don't have to bother to convert the skip/todo tests list. So, you can simply set a test to be todo or skipped by adding the SKIP or TODO keywords in the begin of the test description. For example:

1+2+3 6 SKIP no add operation yet 1-2-3 6 TODO no minus operation yet

NOTE: to add more source test files remember to update the @files array in this file.

SYNOPSIS ^

$ prove languages/abc/t/01-tests.t

AUTHOR ^

Nuno 'smash' Carvalho <mestre.smash@gmail.com>


parrot