()
| 86 | } |
| 87 | |
| 88 | @Test // test error message with file name |
| 89 | public void testNagative7() throws IOException { |
| 90 | File f1 = new File("myscript.pig"); |
| 91 | f1.deleteOnExit(); |
| 92 | |
| 93 | FileWriter fw1 = new FileWriter(f1); |
| 94 | fw1.append("A = loadd '1.txt';"); |
| 95 | fw1.close(); |
| 96 | |
| 97 | String[] args = { "-x", "local", "-c", "myscript.pig" }; |
| 98 | PigStats stats = PigRunner.run(args, null); |
| 99 | |
| 100 | Assert.assertFalse(stats.isSuccessful()); |
| 101 | |
| 102 | String expected = "<file myscript.pig, line 1, column 0>"; |
| 103 | String msg = stats.getErrorMessage(); |
| 104 | |
| 105 | Assert.assertFalse(msg == null); |
| 106 | Assert.assertTrue(msg.startsWith(expected)); |
| 107 | } |
| 108 | |
| 109 | // See PIG-2238 |
| 110 | @Test |
nothing calls this directly
no test coverage detected