diff --git a/test/yaml-parser.cpp b/test/yaml-parser.cpp
index 347999831d61..4cc77e26ae39 100644
--- a/test/yaml-parser.cpp
+++ b/test/yaml-parser.cpp
@@ -536,6 +536,12 @@ protected:
 			return TestFail;
 		}
 
+		/* Test access to nonexistent member. */
+		if (dictObj["nonexistent"].get<std::string>("default") != "default") {
+			cerr << "Accessing nonexistent dict entry fails to return default" << std::endl;
+			return TestFail;
+		}
+
 		/* Make sure utils::map_keys() works on the adapter. */
 		(void)utils::map_keys(dictObj.asDict());
 
