1217275: Fixed bug where \u0000 .. \u0002 characters in string literals caused parse failures.
This commit is contained in:
parent
209836dce9
commit
11fcc82d7c
Binary file not shown.
|
|
@ -0,0 +1,22 @@
|
|||
package com.puppycrawl.tools.checkstyle.grammars;
|
||||
|
||||
import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
|
||||
import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
|
||||
import com.puppycrawl.tools.checkstyle.checks.naming.MemberNameCheck;
|
||||
|
||||
/**
|
||||
* Tests that embedded nulls in string literals does not halt parsing.
|
||||
* @author Michael Studman
|
||||
*/
|
||||
public class EmbeddedNullCharTest
|
||||
extends BaseCheckTestCase
|
||||
{
|
||||
public void testCanParse()
|
||||
throws Exception
|
||||
{
|
||||
final DefaultConfiguration checkConfig =
|
||||
createCheckConfig(MemberNameCheck.class);
|
||||
final String[] expected = {};
|
||||
verify(checkConfig, getPath("grammars/InputEmbeddedNullChar.java"), expected);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue