From ab9cf32131960ee97a9f2f0fdf6dadbd02d3db92 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 8 Apr 2022 14:35:45 +0200 Subject: Add tests for paths --- src/test/rustdoc-js-std/parser-errors.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/test/rustdoc-js-std/parser-errors.js') diff --git a/src/test/rustdoc-js-std/parser-errors.js b/src/test/rustdoc-js-std/parser-errors.js index 7b7ca4dbc35..383c8996c1e 100644 --- a/src/test/rustdoc-js-std/parser-errors.js +++ b/src/test/rustdoc-js-std/parser-errors.js @@ -28,6 +28,8 @@ const QUERY = [ "fn:aaaaa<>b", "->a<>b", "a<->", + "a:: a", + "a ::a", ]; const PARSED = [ @@ -292,4 +294,22 @@ const PARSED = [ userQuery: 'a<->', error: 'Unexpected `-` after `<`', }, + { + elems: [], + foundElems: 0, + original: 'a:: a', + returned: [], + typeFilter: -1, + userQuery: 'a:: a', + error: 'Paths cannot end with `::`', + }, + { + elems: [], + foundElems: 0, + original: 'a ::a', + returned: [], + typeFilter: -1, + userQuery: 'a ::a', + error: 'Paths cannot start with `::`', + }, ]; -- cgit 1.4.1-3-g733a5