From 6c0aacf7e72b7c66acc9cdd469eff12d305a8f7e Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Fri, 23 Nov 2012 10:11:48 +0000 Subject: Removed the old test cases and added new ones.:wq --- t/test-custodian-parser.rb | 141 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100755 t/test-custodian-parser.rb (limited to 't/test-custodian-parser.rb') diff --git a/t/test-custodian-parser.rb b/t/test-custodian-parser.rb new file mode 100755 index 0000000..8fe794e --- /dev/null +++ b/t/test-custodian-parser.rb @@ -0,0 +1,141 @@ +#!/usr/bin/ruby1.8 -I./lib/ -I../lib/ + + +require 'test/unit' +require 'custodian/parser' + + + + +# +# Unit test for our parser. +# +class TestCustodianParser < Test::Unit::TestCase + + # + # Create the test suite environment: NOP. + # + def setup + end + + # + # Destroy the test suite environment: NOP. + # + def teardown + end + + + + + + + # + # Test we can create a new parser object - specifically + # that it throws exceptions if it is not given a filename + # that exists. + # + def test_init + + # + # Constructor + # + assert_nothing_raised do + Custodian::Parser.new() + end + end + + + + # + # Test that we can define macros. + # + def test_macros_lines + + parser = Custodian::Parser.new() + + # + # Input text + # + text =<