File: Test-Assertions-TestScript.t

package info (click to toggle)
libtest-assertions-perl 1.054-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 148 kB
  • ctags: 31
  • sloc: perl: 562; makefile: 15
file content (26 lines) | stat: -rw-r--r-- 767 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/local/bin/perl -w

# We want to use the development version of T::A::TestScript
use File::Spec::Functions qw( :ALL );
BEGIN {
	if ($0) {
		my ($vol, $dir, $file) = splitpath(rel2abs($0));
		my @parent_dir = splitdir(canonpath($dir));
		pop @parent_dir;
		my $lib_dir = catpath($vol, catdir(@parent_dir,'lib'), '');
		unshift @INC, $lib_dir;
	} else {
		die "Could not find script location\n";
	}
}

use vars qw($opt_b);
use Test::Assertions::TestScript(options => {'b', \$opt_b});

ASSERT($Test::Assertions::TestScript::VERSION, "Compiled version $Test::Assertions::TestScript::VERSION");

TRACE("Sample trace message to test -t option");
ASSERT(1, "Correctly generates test output");
TRACE("Command-line -b option set \$opt_b variable", $opt_b);

sub TRACE{}