Add a test that we can get values from an unresolved config

This commit is contained in:
Havoc Pennington 2013-12-20 09:02:14 -05:00
parent 48fe0e9712
commit a48edce4b4

View File

@ -908,4 +908,13 @@ class PublicApiTest extends TestUtils {
assertTrue("stuff gets cached repeatedly sys", sys3 eq sys4)
assertTrue("stuff gets cached repeatedly conf", conf3 eq conf4)
}
@Test
def canUseSomeValuesWithoutResolving(): Unit = {
val conf = ConfigFactory.parseString("a=42,b=${NOPE}")
assertEquals(42, conf.getInt("a"))
intercept[ConfigException.NotResolved] {
conf.getInt("b")
}
}
}