diff --git a/src/test/scala/com/typesafe/config/impl/ConfigTest.scala b/src/test/scala/com/typesafe/config/impl/ConfigTest.scala index 5d28e1c2..8fbaf7cc 100644 --- a/src/test/scala/com/typesafe/config/impl/ConfigTest.scala +++ b/src/test/scala/com/typesafe/config/impl/ConfigTest.scala @@ -482,6 +482,12 @@ class ConfigTest extends TestUtils { assertTrue(nonEmpty ne nonEmptyIgnoringFallbacks) assertTrue(empty ne emptyIgnoringFallbacks) + // falling back from one object to another should not make us ignore fallbacks + assertEquals(false, ignoresFallbacks(nonEmpty.withFallback(empty))) + assertEquals(false, ignoresFallbacks(empty.withFallback(nonEmpty))) + assertEquals(false, ignoresFallbacks(empty.withFallback(empty))) + assertEquals(false, ignoresFallbacks(nonEmpty.withFallback(nonEmpty))) + // falling back from primitive just returns this assertTrue(primitive eq primitive.withFallback(empty)) assertTrue(primitive eq primitive.withFallback(nonEmpty))