NAME

SheetTest - Spreadsheet::Engine test mechanism

SYNOPSIS

use lib 't/lib';
use SheetTest;

run_tests( 
  commands => \@commands,
  against => 't/data/my_test_data.txt'
);

DESCRIPTION

Run a series of test commands against a spreadsheet.

EXPORTS

run_tests

run_tests( 
  commands => \@commands,
  against => 't/data/my_test_data.txt'
);

Both arguments are optional.

If a list of commands is not given, then the commands will be read from the <DATA> section of the calling test file.

If a source file is not given, then a blank spreadsheet will be created, and the commands given will be responsible for also setting up all data.

The $sheet created will be returned in case you want to peform any other tests against it.

COMMANDS

test / like

test B1 30
like B2 ^string

Test against the data value in the cell specified.

testtype

testtype B3 n

Test against the valuetype in the cell specified.

isnear

isnear B1 0.404194

Test that the numeric value given is correct to at least as many decimal places given.

others

Any other line (ignoring blank lines and comment lines starting with #) is executed 'as is' and followed by a recalc.

HISTORY

This code was created for Spreadsheet::Engine.

COPYRIGHT

Copyright (c) 2007, 2008 Tony Bowden

LICENCE

The contents of this file are subject to the Artistic License 2.0; you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.perlfoundation.org/artistic_license_2_0