Context
Passing an unknown engine name currently fails with no "x" search engine found,
which doesn't tell the user what's valid. Browser mode and raw mode also support
different engine sets, and nothing pins that behavior in a test.
Scope
- Make the unknown-engine error list the valid engine names for the mode.
- Add a table test in
cmd/ asserting:
- browser mode accepts
google, yandex, baidu, bing, duckduckgo, ecosia;
- raw mode accepts
google, yandex, baidu, ecosia and returns a clear
error for bing and duckduckgo;
- an unknown name returns the new listing error.
Done when
- The error message names the valid engines for the mode.
- The test covers browser mode, raw mode, and the unknown-engine case.
Contributor notes
Both dispatch switches live in cmd/search.go.
Context
Passing an unknown engine name currently fails with
no "x" search engine found,which doesn't tell the user what's valid. Browser mode and raw mode also support
different engine sets, and nothing pins that behavior in a test.
Scope
cmd/asserting:google,yandex,baidu,bing,duckduckgo,ecosia;google,yandex,baidu,ecosiaand returns a clearerror for
bingandduckduckgo;Done when
Contributor notes
Both dispatch switches live in
cmd/search.go.