From 2f610d621f52fe83863c19ac65f7e1336bce838d Mon Sep 17 00:00:00 2001 From: Kaushal Modi Date: Sat, 25 May 2019 14:20:25 -0400 Subject: Use the correct HTML file reference in "nim doc" generated idx files (#11326) * Use the correct HTML file reference in "nim doc" generated idx files Now "nim doc --out:foo.html --index:on bar.nim" generates "foo.html" and the generated "bar.idx" contains references to "foo.html". Fixes https://github.com/nim-lang/Nim/issues/11325. * Refactor the nim doc tester to extend it for more tests * Reference the HTML files relative to the outDir, not project dir * Add test for issues #11312 and #11325 - https://github.com/nim-lang/Nim/issues/11312 - https://github.com/nim-lang/Nim/issues/11325 --- nimdoc/test_out_index_dot_html/expected/foo.idx | 1 + nimdoc/test_out_index_dot_html/expected/index.html | 850 +++++++++++++++++++++ .../test_out_index_dot_html/expected/theindex.html | 808 ++++++++++++++++++++ 3 files changed, 1659 insertions(+) create mode 100644 nimdoc/test_out_index_dot_html/expected/foo.idx create mode 100644 nimdoc/test_out_index_dot_html/expected/index.html create mode 100644 nimdoc/test_out_index_dot_html/expected/theindex.html (limited to 'nimdoc/test_out_index_dot_html/expected') diff --git a/nimdoc/test_out_index_dot_html/expected/foo.idx b/nimdoc/test_out_index_dot_html/expected/foo.idx new file mode 100644 index 000000000..a8dabb67e --- /dev/null +++ b/nimdoc/test_out_index_dot_html/expected/foo.idx @@ -0,0 +1 @@ +foo index.html#foo foo: foo() diff --git a/nimdoc/test_out_index_dot_html/expected/index.html b/nimdoc/test_out_index_dot_html/expected/index.html new file mode 100644 index 000000000..8ee7dfd22 --- /dev/null +++ b/nimdoc/test_out_index_dot_html/expected/index.html @@ -0,0 +1,850 @@ + + + + + + + + + + + + + + + + + +foo + + + + + + + + +
+
+

foo

+
+
+ +
+ Search: +
+
+ Group by: + +
+ + +
+
+
+

+
+

Procs

+
+ +
proc foo() {...}{.raises: [], tags: [].}
+
+I do foo + +
+ +
+ +
+
+ +
+ +
+
+
+ + + diff --git a/nimdoc/test_out_index_dot_html/expected/theindex.html b/nimdoc/test_out_index_dot_html/expected/theindex.html new file mode 100644 index 000000000..9213f1459 --- /dev/null +++ b/nimdoc/test_out_index_dot_html/expected/theindex.html @@ -0,0 +1,808 @@ + + + + + + + + + + + + + + + + + +Index + + + + + + + + +
+
+

Index

+ Modules: index.

API symbols

+
foo:
+
+
+ +
+
+
+ + + -- cgit 1.4.1-2-gfad0