Revision: 7005 http://languagetool.svn.sourceforge.net/languagetool/?rev=7005&view=rev Author: milek_pl Date: 2012-05-19 21:48:42 +0000 (Sat, 19 May 2012) Log Message: ----------- add hunspell commandline test
Modified Paths: -------------- trunk/JLanguageTool/src/test/org/languagetool/MainTest.java Modified: trunk/JLanguageTool/src/test/org/languagetool/MainTest.java =================================================================== --- trunk/JLanguageTool/src/test/org/languagetool/MainTest.java 2012-05-19 21:46:19 UTC (rev 7004) +++ trunk/JLanguageTool/src/test/org/languagetool/MainTest.java 2012-05-19 21:48:42 UTC (rev 7005) @@ -215,6 +215,20 @@ assertTrue(output.indexOf("1.) Line 1, column 31, Rule ID: PL_WORD_REPEAT") != -1); } + public void testPolishSpelling() throws IOException, ParserConfigurationException, SAXException { + final String test = "Zwuasdac?"; + final byte[] b = test.getBytes(); + System.setIn(new ByteArrayInputStream(b)); + String[] args = new String[] {"-l", "pl", "-e", "HUNSPELL_RULE", "-"}; + + Main.main(args); + String output = new String(this.out.toByteArray()); + assertTrue(output.indexOf("Expected text language: Polish") == 0); + assertTrue(output.indexOf("Working on STDIN...") != -1); + assertTrue(output.indexOf("1.) Line 1, column 1, Rule ID: HUNSPELL_RULE") != -1); + } + + public void testEnglishFileRuleDisabled() throws URISyntaxException, IOException, ParserConfigurationException, SAXException { final URL url = this.getClass().getResource(ENGLISH_TEST_FILE); final URI uri = new URI (url.toString()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Languagetool-cvs mailing list Languagetool-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/languagetool-cvs