Commits

Anonymous committed d0d1a65

Converted CmdLine-Moose.pl to TAP.

  • Participants
  • Parent commits 5946dbb

Comments (0)

Files changed (3)

File installer/tests/Makefile

 $(BASH_TESTS_TARGETS) :: test-% :
 	cd $(patsubst test-%,%,$@) && bash test1.bash
 
-PERL_TESTS = CmdLine-Moose
-
-PERL_TESTS_TARGETS = $(addprefix perl-test-,$(PERL_TESTS))
-
-$(PERL_TESTS_TARGETS) :: perl-test-% :
-	perl perl/$(patsubst perl-test-%,%,$@).pl
-
 bash-tests: $(BASH_TESTS_TARGETS)
 
-perl-tests: $(PERL_TESTS_TARGETS) perl-tests-t
+perl-tests: perl-tests-t
 
 check: perl-tests bash-tests 
 

File installer/tests/perl/CmdLine-Moose.pl

-#!/usr/bin/perl
-
-use strict;
-use warnings;
-
-use Shlomif::Quad::Pres::CmdLine;
-
-my $o = Shlomif::Quad::Pres::CmdLine->new('cmd_line' => ["render", "-a"]);
-
-$o->src_dir("Hello");
-if ($o->src_dir() ne "Hello")
-{
-    die "src_dir() does not work.";
-}

File installer/tests/perl/t/cmdline-1.t

+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More tests => 1;
+
+use Shlomif::Quad::Pres::CmdLine;
+
+{
+    my $o = Shlomif::Quad::Pres::CmdLine->new('cmd_line' => ["render", "-a"]);
+
+    $o->src_dir("Hello");
+
+    # TEST
+    is ($o->src_dir(), "Hello", "src_dir accessor works.")
+}