Commits

Palmer, 2E0EOL  committed 8ef4580 Draft

Add some very basic test suites.

  • Participants
  • Parent commits 254f638

Comments (0)

Files changed (2)

+#!/usr/bin/perl -w
+#
+# This is a very basic test of the object, to ensure all functions declared
+# as public are available.
+#
+
+package main;
+use Text::CSV::SpiceWorks::Parser;
+use Test::More tests => 2;
+
+use strict;
+use warnings;
+use diagnostics;
+#----------------------------------------------------------------------------
+use constant TEST_PACKAGE => 'Text::CSV::SpiceWorks::Parser';
+
+sub t_main();
+#----------------------------------------------------------------------------
+sub t_main()
+{
+	my @methods = qw(
+		new
+		Packages
+	);
+	my $o = TEST_PACKAGE()->new();
+	isa_ok($o, TEST_PACKAGE(), 'new');
+	can_ok($o, @methods);
+	return 0;
+}
+#----------------------------------------------------------------------------
+exit(t_main()) if ( !caller() );
+#----------------------------------------------------------------------------
+1;
+#!/usr/bin/perl -w
+
+use Text::CSV::SpiceWorks::Parser;
+package main;
+use Test::More tests => 1;
+
+use constant CHECK_PKG => 'Text::CSV::SpiceWorks::Parser';
+use constant CHECK_VER => '0.0.0';
+
+is(
+	$Text::CSV::SpiceWorks::Parser::VERSION,
+	CHECK_VER(),
+	sprintf(
+		'%s::VERSION is \'%s\'',
+		CHECK_PKG(),
+		CHECK_VER()
+	)
+);