Commits

Palmer, 2E0EOL committed 2333907 Draft

Write wrapper which calls Package() function

  • Participants
  • Parent commits 875b213

Comments (0)

Files changed (1)

+#!/usr/bin/perl -w
+#
+# These tests read the demo.csv file.
+#
+
+package main;
+use Text::CSV::SpiceWorks::Parser;
+use Test::More tests => 2;
+use Data::Dumper;
+
+use strict;
+use warnings;
+use diagnostics;
+#----------------------------------------------------------------------------
+use constant TEST_PACKAGE => 'Text::CSV::SpiceWorks::Parser';
+
+sub t_Packages($$);
+sub t_main();
+#----------------------------------------------------------------------------
+sub t_Packages($$)
+{
+	my ( $F, $O ) = @_;
+	die Dumper $O->Packages();
+}
+#----------------------------------------------------------------------------
+sub t_main()
+{
+	my %tests = (
+		'Packages' => \&t_Packages
+	);
+	while ( my ( $name, $func ) = each(%tests) ) {
+		my $o = TEST_PACKAGE()->new();
+
+		$func->($name, $o);
+	}
+	return 0;
+}
+#----------------------------------------------------------------------------
+exit(t_main()) if ( !caller() );
+#----------------------------------------------------------------------------
+1;