diff --git a/tests/data/example_numbering_001.xml b/tests/data/example_numbering_001.xml
new file mode 100644
index 00000000..8ca07538
--- /dev/null
+++ b/tests/data/example_numbering_001.xml
@@ -0,0 +1,31 @@
+
+
+
+ - 1. example without an xml:id
+
+
+
+
+
+ - 2. example without an xml:id
+
+
+
+
+
+ - 3. example with an xml:id
+
+
+
+
+
+ - 4. example without an xml:id
+
+
+
+
+
+ - 5. example without an xml:id
+
+
+
diff --git a/tests/example_numbering_001.phpt b/tests/example_numbering_001.phpt
new file mode 100644
index 00000000..4928b6fa
--- /dev/null
+++ b/tests/example_numbering_001.phpt
@@ -0,0 +1,87 @@
+--TEST--
+Example numbering 001 - indexing and rendering examples with and without an xml:id
+--FILE--
+ true,
+ "xml_file" => $xml_file,
+]);
+
+$indexRepository = new IndexRepository(new \SQLite3(":memory:"));
+$indexRepository->init();
+Config::set_indexcache($indexRepository);
+
+$index = new TestIndex($indexRepository);
+
+$render = new TestRender(new Reader, new Config, null, $index);
+
+$render->run();
+
+$indexes = array_keys($index->getNfo());
+
+echo "Indexes stored:\n";
+
+var_dump($indexes);
+
+$format = new TestGenericChunkedXHTML;
+
+$render = new TestRender(new Reader, new Config, $format);
+
+$render->run();
+
+?>
+--EXPECT--
+Indexes stored:
+array(6) {
+ [0]=>
+ string(17) "example-numbering"
+ [1]=>
+ string(9) "example-1"
+ [2]=>
+ string(9) "example-2"
+ [3]=>
+ string(16) "third-example-id"
+ [4]=>
+ string(9) "example-4"
+ [5]=>
+ string(9) "example-5"
+}
+Filename: example-numbering.html
+Content:
+
+
+
+
Example #1 - 1. example without an xml:id
+
+
+
+
+
+
Example #2 - 2. example without an xml:id
+
+
+
+
+
+
Example #3 - 3. example with an xml:id
+
+
+
+
+
+
Example #4 - 4. example without an xml:id
+
+
+
+
+
+
Example #5 - 5. example without an xml:id
+
+
+