mirror of
https://github.com/lightbend/config.git
synced 2025-03-14 19:30:25 +08:00
fixed tests failing in travis - they had been disabled on windows
This commit is contained in:
parent
9596fea017
commit
2243a011d5
@ -384,7 +384,7 @@ final class ConfigDocumentParser {
|
||||
|
||||
// quoted string
|
||||
if (!Tokens.isValueWithType(t, ConfigValueType.STRING)) {
|
||||
throw parseError("expecting a quoted string inside file(), classpath(), or url(), rather than: "
|
||||
throw parseError("expecting include parameter to be a quoted string inside file(), classpath(), or url(), rather than: "
|
||||
+ t);
|
||||
}
|
||||
children.add(new ConfigNodeSimpleValue(t));
|
||||
|
@ -645,7 +645,7 @@ class ConfParserTest extends TestUtils {
|
||||
// properties-like syntax
|
||||
val conf8 = parseConfig("""
|
||||
# ignored comment
|
||||
|
||||
|
||||
# x.y comment
|
||||
x.y = 10
|
||||
# x.z comment
|
||||
@ -710,29 +710,22 @@ class ConfParserTest extends TestUtils {
|
||||
|
||||
@Test
|
||||
def includeFileNotQuoted() {
|
||||
// this test cannot work on Windows
|
||||
val f = resourceFile("test01")
|
||||
if (isWindows) {
|
||||
System.err.println("includeFileNotQuoted test skipped on Windows")
|
||||
} else {
|
||||
val e = intercept[ConfigException.Parse] {
|
||||
ConfigFactory.parseString("include file(" + f + ")")
|
||||
}
|
||||
assertTrue("wrong exception: " + e.getMessage, e.getMessage.contains("expecting include parameter"))
|
||||
val e = intercept[ConfigException.Parse] {
|
||||
ConfigFactory.parseString("include file(" + f + ")")
|
||||
}
|
||||
assertTrue("wrong exception: " + e.getMessage,
|
||||
e.getMessage.contains("expecting include parameter to be a quoted string"))
|
||||
}
|
||||
|
||||
@Test
|
||||
def includeFileNotQuotedAndSpecialChar() {
|
||||
val f = resourceFile("test01")
|
||||
if (isWindows) {
|
||||
System.err.println("includeFileNotQuoted test skipped on Windows")
|
||||
} else {
|
||||
val e = intercept[ConfigException.Parse] {
|
||||
ConfigFactory.parseString("include file(:" + f + ")")
|
||||
}
|
||||
assertTrue("wrong exception: " + e.getMessage, e.getMessage.contains("expecting a quoted string"))
|
||||
val e = intercept[ConfigException.Parse] {
|
||||
ConfigFactory.parseString("include file(:" + f + ")")
|
||||
}
|
||||
assertTrue("wrong exception: " + e.getMessage,
|
||||
e.getMessage.contains("expecting include parameter to be a quoted string"))
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user