diff --git a/README.md b/README.md index 240aaca154..542e4e4ef2 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ $ opam install ancient $ export SHERLODOC_DB=/tmp/sherlodoc.ancient # index all odoc files generated by odig for your current switch: -$ sherlodoc index $(find $OPAM_SWITCH_PREFIX/var/cache/odig/odoc -name '*.odocl') +$ sherlodoc index $(find $OPAM_SWITCH_PREFIX/var/cache/odig/odoc -name '*.odocl' | grep -v __) ``` Enjoy searching from the command-line or run the webserver: @@ -70,7 +70,7 @@ Otherwise, manual integration with odoc requires to add to every call of `odoc h ```bash $ sherlodoc index --db=_build/default/_doc/_html/YOUR_LIB/db.js \ - $(find _build/default/_doc/_odocls/YOUR_LIB -name '*.odocl') + $(find _build/default/_doc/_odocls/YOUR_LIB -name '*.odocl' | grep -v __) $ sherlodoc js > _build/default/_doc/_html/sherlodoc.js ``` diff --git a/test/cram/base_benchmark.t b/test/cram/base_benchmark.t index 960ca5d776..efbc168d07 100644 --- a/test/cram/base_benchmark.t +++ b/test/cram/base_benchmark.t @@ -1,4 +1,4 @@ This test will fail, it is not deterministic. Please just check that the values are not crazy and discard the changes - $ ODOCLS=$(find ../docs/odoc/base/ -name '*.odocl' | sort) - $ sherlodoc index --format=js --db=db.js $ODOCLS > /dev/null + $ ODOCLS=$(find ../docs/odoc/base/ -name '*.odocl' | grep -v "__") + $ sherlodoc index --format=js --db=db.js $ODOCLS diff --git a/test/cram/base_cli.t b/test/cram/base_cli.t index 2def58d996..f7cea65640 100644 --- a/test/cram/base_cli.t +++ b/test/cram/base_cli.t @@ -1,7 +1,7 @@ - $ ODOCLS=$(find ../docs/odoc/base/ -name '*.odocl') + $ ODOCLS=$(find ../docs/odoc/base/ -name '*.odocl' | grep -v "__") $ export SHERLODOC_DB=db.bin $ export SHERLODOC_FORMAT=marshal - $ sherlodoc index --index-docstring=false $ODOCLS > /dev/null + $ sherlodoc index --index-docstring=false $ODOCLS $ sherlodoc search --print-cost --limit 100 "S_poly" 200 sig Base.Map.S_poly 200 sig Base.Set.S_poly diff --git a/test/cram/base_odocls.t b/test/cram/base_odocls.t index 6214582519..42197104fd 100644 --- a/test/cram/base_odocls.t +++ b/test/cram/base_odocls.t @@ -1,3 +1,11 @@ + $ find ../docs/odoc/base/ -name '*.odocl' -exec basename '{}' ';' | grep -v "__" | sort + base.odocl + base_internalhash_types.odocl + caml.odocl + md5_lib.odocl + page-index.odocl + shadow_stdlib.odocl + $ find ../docs/odoc/base/ -name '*.odocl' -exec basename '{}' ';' | sort base.odocl base__.odocl diff --git a/test/cram/base_web.t b/test/cram/base_web.t index 448ddd4c33..c6ea9ddf56 100644 --- a/test/cram/base_web.t +++ b/test/cram/base_web.t @@ -1,8 +1,8 @@ - $ ODOCLS=$(find ../docs/odoc/base/ -name '*.odocl' | sort) + $ ODOCLS=$(find ../docs/odoc/base/ -name '*.odocl' | grep -v "__" | sort) $ cat $ODOCLS > megaodocl $ du -sh megaodocl 13M megaodocl - $ sherlodoc index --index-docstring=true --index-name=true --type-search=true --format=js --db=db.js $ODOCLS > /dev/null + $ sherlodoc index --index-docstring=true --index-name=true --type-search=true --format=js --db=db.js $ODOCLS $ gzip -k db.js diff --git a/test/cram/multi_package.t b/test/cram/multi_package.t index f8f5d5f7c4..e0dd47ce3b 100644 --- a/test/cram/multi_package.t +++ b/test/cram/multi_package.t @@ -1,9 +1,9 @@ - $ ODOCLS=$(find ../docs/odoc/ -name '*.odocl' | sort) + $ ODOCLS=$(find ../docs/odoc/ -name '*.odocl' | grep -v "__" | sort) $ echo "$ODOCLS" | awk 'END { print NR }' - 142 + 6 $ export SHERLODOC_DB=db.bin $ export SHERLODOC_FORMAT=marshal - $ sherlodoc index --index-docstring=false $ODOCLS > /dev/null + $ sherlodoc index --index-docstring=false $ODOCLS $ sherlodoc search --print-cost --limit 100 "S_poly" 200 sig Base.Map.S_poly 200 sig Base.Set.S_poly