@Test public void testQuotedTextInComment() {
ParamLocationRecognizer recognizer = new ParamLocationRecognizer();
ParameterParser.parse("-- 'This' should not fail the test.\n"
+ "SELECT column FROM Table WHERE column <> :param", recognizer);
assertTrue(recognizer.getNamedParameterDescriptionMap().containsKey("param"));
}
@Test public void testContractionInComment() {
ParamLocationRecognizer recognizer = new ParamLocationRecognizer();
ParameterParser.parse("-- This shouldn't fail the test.\n" + "SELECT column FROM Table WHERE column <> :param",
recognizer);
assertTrue(recognizer.getNamedParameterDescriptionMap().containsKey("param"));
}
@Test public void testApostropheInOracleAlias() {
ParamLocationRecognizer recognizer = new ParamLocationRecognizer();
ParameterParser.parse("SELECT column as \"Table's column\" FROM Table WHERE column <> :param", recognizer);
assertTrue(recognizer.getNamedParameterDescriptionMap().containsKey("param"));
}