home *** CD-ROM | disk | FTP | other *** search
- -- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C)
- -- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
- --
- class TEST_ARGUMENTS
- --
- -- Test Access to command-line arguments :
- --
-
- creation {ANY}
- make
-
- feature {ANY}
-
- make is
- do
- if argument_count = 0 then
- if not ("./a.out").is_equal(argument(0)) then
- std_output.put_string("TEST_ARGUMENTS error #1%N");
- end;
- elseif argument_count = 1 then
- if not ("./a.out").is_equal(argument(0)) then
- std_output.put_string("TEST_ARGUMENTS error #2.0%N");
- end;
- if not ("1").is_equal(argument(1)) then
- std_output.put_string("TEST_ARGUMENTS error #2.1%N");
- end;
- elseif argument_count = 2 then
- if not ("./a.out").is_equal(argument(0)) then
- std_output.put_string("TEST_ARGUMENTS error #3.1%N");
- end;
- if not ("2").is_equal(argument(1)) then
- std_output.put_string("TEST_ARGUMENTS error #3.1%N");
- end;
- if not ("arg2").is_equal(argument(2)) then
- std_output.put_string("TEST_ARGUMENTS error #3.2%N");
- end;
- else
- std_output.put_string("TEST_ARGUMENTS error #4%N");
- end;
- end;
-
- end -- TEST_ARGUMENTS
-