This is a sample test case for the Lines Of Code Counter application.  Refer to the help page for usage directions.

Test Case 1

Purpose:
  1. Verify that the command line parameters work properly;

  2. specifically,         -n   ignore comments
                 -d   use directory
Requirement Traceability: Setup:

From a Windows platform, download the application  LOC.jar  with Internet Explorer or download LOC.zip  with Netscape Navigator and rename to LOC.jar.
Open a command window and change to the directory where LOC.jar is located.
Create a test input file named LOCsmoketest.txt which contains four lines of text, one of which is a comment. (see example at bottom).
 

Test Data:
 
 

Action
Input
Expected Output
Enter the command: java -cp LOC.jar textui.LOC  LOCsmoketest.txt

java -cp LOC.jar textui.LOC -n LOCsmoketest.txt

00004 LOCsmoketest.txt

00003 LOCsmoketest.txt
 

 

Move the data file to the root directory.

Enter the command:
 (Note: there is a blank before the filename).

MOVE LOCsmoketest.txt C:\
 

java -cp LOC.jar textui.LOC -d C:\  LOCsmoketest.txt


 

00004 LOCsmoketest.txt
 



Example input file: LOCsmoketest.txt

Line 1

Line 2
Line 3

// Line 4