public static int testPrivate(int testNum)
	{
		String inputFilename = String.format("tests/testP%02d.crx", testNum);
		String outputFilename = String.format("tests/testP%02d.rea", testNum);
		String expectedFilename = String.format("tests/testP%02d.out", testNum);

		Scanner s = null;
		try
		{
			s = new Scanner(new FileReader(inputFilename));
		}
		catch (IOException e)
		{
			e.printStackTrace();
			return NOT_ACCESSABLE;
		}

		Parser p = new Parser(s);
		p.parse();

		try
		{
			PrintStream outputStream = new PrintStream(outputFilename);
			if (p.hasError())
			{
				outputStream.println("Error parsing file.");
				outputStream.println(p.errorReport());
				outputStream.close();
				// System.exit(-3);
			}
			else
			{
				outputStream.println("Crux program successfully parsed.");
				outputStream.close();
			}
		}
		catch (IOException e)
		{
			System.err.println("Error opening output file: \"" + outputFilename + "\"");
			e.printStackTrace();
			return IO_ERROR;
		}

		BufferedReader bufferedexpected;
		BufferedReader bufferedoutput;

		String lineExpected;
		String lineOutput;

		try
		{
			bufferedexpected = new BufferedReader(new FileReader(expectedFilename));
			bufferedoutput = new BufferedReader(new FileReader(outputFilename));
		}
		catch (FileNotFoundException e)
		{
			e.printStackTrace();
			return IO_ERROR;
		}

		int result = PASS;

		try
		{
			while ((lineExpected = bufferedexpected.readLine()) != null)
			{
				lineOutput = bufferedoutput.readLine();
				if (lineOutput == null)
				{
					result = FAIL;
					break;
				}
				lineExpected = lineExpected.replaceAll("\\s+$", "");
				lineOutput = lineOutput.replaceAll("\\s+$", "");
				if (!lineExpected.equals(lineOutput))
				{
					result = FAIL;
					break;
				}
			}
		}
		catch (IOException e)
		{
			e.printStackTrace();
			result = IO_ERROR;
		}

		try
		{
			bufferedoutput.close();
			bufferedexpected.close();
		}
		catch (IOException e)
		{
			e.printStackTrace();
		}

		return result;
	}