Annotation Type EOL
-
@Target({FIELD,PARAMETER,METHOD,CONSTRUCTOR,TYPE,ANNOTATION_TYPE}) @Retention(RUNTIME) @Inherited public @interface EOL
EOLcan be used in combination withTestResourceto specify a specific line separator to use. This can be useful to create tests that work on different operating systems.The line separator to use is looked up in the following order:
- An
EOLannotation on the field or parameter itself - For parameters, an
EOLannotation on the constructor or method - An
EOLannotation on the class defining the field, constructor or method - An
EOLannotation on any declaring class - The default line separator that is defined via the "com.github.robtimus.junit.support.extension.testresource.lineSeparator" configuration parameter, which can be
supplied via the JUnit
LauncherAPI, build tools (e.g., Gradle and Maven), a JVM system property, or the JUnit Platform configuration file (i.e., a file namedjunit-platform.propertiesin the root of the class path). Consult the JUnit User Guide for further information.This configuration parameter can take a literal value, or one of the following pre-defined values:
LFfor\nCRfor\rCRLFfor\r\nSYSTEMforSystem.lineSeparator()ORIGINALfor line separators from the original file; this is the default settingNONEfor no line separators
- Author:
- Rob Spoor
- Since:
- 2.0
- An
-
-
Field Summary
Fields Modifier and Type Fields Description static StringCRA single carriage return character (\r\n).static StringCRLFA carriage return followed by a line feed character (\r\n).static StringDEFAULT_EOL_PROPERTY_NAMEThe property that can be used to define the default line separator.static StringLFA single line feed character (\n).static StringNONENo line separator.static StringORIGINALA marker that indicates the line separators from the original file should be used.static StringSYSTEMA marker that indicates the system line separator should be used.
-
-
-
Field Detail
-
LF
static final String LF
A single line feed character (\n).
-
-
-
CR
static final String CR
A single carriage return character (\r\n).
-
-
-
CRLF
static final String CRLF
A carriage return followed by a line feed character (\r\n).
-
-
-
SYSTEM
static final String SYSTEM
A marker that indicates the system line separator should be used.
-
-
-
ORIGINAL
static final String ORIGINAL
A marker that indicates the line separators from the original file should be used. This can be useful in case an enclosing member or class defines a different line separator, or if a different line separator is defined via the "com.github.robtimus.junit.support.extension.testresource.lineSeparator" configuration parameter.
-
-
-
NONE
static final String NONE
No line separator. In other words, all lines are combined into one large line.
-
-
-
DEFAULT_EOL_PROPERTY_NAME
static final String DEFAULT_EOL_PROPERTY_NAME
The property that can be used to define the default line separator.
-
-
Element Detail
-
value
String value
The line separator to use.
-
-