diff --git a/cdist/test/cdist_type/__init__.py b/cdist/test/cdist_type/__init__.py
index 36a524b4..ccbf6742 100644
--- a/cdist/test/cdist_type/__init__.py
+++ b/cdist/test/cdist_type/__init__.py
@@ -153,3 +153,10 @@ class TypeTestCase(test.CdistTestCase):
         self.assertFalse('optional2' in cdist_type.parameter_defaults)
         self.assertEqual(cdist_type.parameter_defaults['optional1'], 'value1')
 
+    def test_directory_in_default(self):
+        base_path = fixtures
+        cdist_type = core.CdistType(base_path, '__directory_in_default')
+        self.assertEqual(
+            list(sorted(cdist_type.parameter_defaults.keys())),
+            ['bar', 'foo']
+        )
diff --git a/cdist/test/cdist_type/fixtures/__directory_in_default/parameter/default/a/.gitkeep b/cdist/test/cdist_type/fixtures/__directory_in_default/parameter/default/a/.gitkeep
new file mode 100644
index 00000000..e69de29b
diff --git a/cdist/test/cdist_type/fixtures/__directory_in_default/parameter/default/bar b/cdist/test/cdist_type/fixtures/__directory_in_default/parameter/default/bar
new file mode 100644
index 00000000..e69de29b
diff --git a/cdist/test/cdist_type/fixtures/__directory_in_default/parameter/default/foo b/cdist/test/cdist_type/fixtures/__directory_in_default/parameter/default/foo
new file mode 100644
index 00000000..e69de29b
diff --git a/cdist/test/cdist_type/fixtures/__directory_in_default/parameter/optional b/cdist/test/cdist_type/fixtures/__directory_in_default/parameter/optional
new file mode 100644
index 00000000..3bd1f0e2
--- /dev/null
+++ b/cdist/test/cdist_type/fixtures/__directory_in_default/parameter/optional
@@ -0,0 +1,2 @@
+foo
+bar