mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2026-02-02 15:45:11 +01:00
feat: suggestion tests
This commit is contained in:
parent
58b6a65a75
commit
5a4ef05828
7 changed files with 95 additions and 0 deletions
6
tests/cases/file_path
Normal file
6
tests/cases/file_path
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
case="file path typo"
|
||||
command="cd ./correc"
|
||||
error="no such file or directory"
|
||||
expect="cd ./correct"
|
||||
|
||||
mkdir -p correct
|
||||
4
tests/cases/privilege
Normal file
4
tests/cases/privilege
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
case="privilege"
|
||||
command="pacman -Syu"
|
||||
error="you cannot perform this operation unless you are root"
|
||||
expect="sudo pacman -Syu"
|
||||
7
tests/cases/regex_cmd
Normal file
7
tests/cases/regex_cmd
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
case="regex: command"
|
||||
command="touch dir/file"
|
||||
error="no such file or directory"
|
||||
expect="\
|
||||
mkdir --parents dir/ &&
|
||||
touch dir/file\
|
||||
"
|
||||
7
tests/cases/regex_err
Normal file
7
tests/cases/regex_err
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
case="regex: error"
|
||||
command="cargo built"
|
||||
error="
|
||||
error: no such command: \`built\`
|
||||
Did you mean \`build\`?
|
||||
"
|
||||
expect="cargo build"
|
||||
6
tests/cases/regex_opt
Normal file
6
tests/cases/regex_opt
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
case="regex: options"
|
||||
command="rm correc -r"
|
||||
error="no such file or directory"
|
||||
expect="rm -r ./correct"
|
||||
|
||||
mkdir -p correct
|
||||
4
tests/cases/typo
Normal file
4
tests/cases/typo
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
case="command typo"
|
||||
command="echp"
|
||||
error="command not found"
|
||||
expect="echo"
|
||||
Loading…
Add table
Add a link
Reference in a new issue