test: add more completion tests (#776)

* dev: add more tests

* test: add show/set completion tests

* test: test completion about arguments of builtin functions
This commit is contained in:
Myriad-Dreamin 2024-11-08 16:15:45 +08:00 committed by GitHub
parent 411f29fd53
commit 662ae488be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 681 additions and 5 deletions

View file

@ -166,7 +166,7 @@ pub fn find_test_range(s: &Source) -> Range<usize> {
}
let (re_base, re_len, is_after) = find_prefix(s.text(), "/* range after ", true)
.or_else(|| find_prefix(s.text(), "/* range ", false))
.unwrap();
.unwrap_or_else(|| panic!("no range marker found in source:\n{}", s.text()));
let re_end = re_base + re_len;
let range_rng = re_end..(s.text()[re_end..].find(" */").unwrap() + re_end);
let range_base = if is_after {