summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDenis Isidoro <denisidoro@users.noreply.github.com>2021-04-11 07:43:25 -0300
committerGitHub <noreply@github.com>2021-04-11 07:43:25 -0300
commitd550b29fb0987216e0215e32f36087ec46126a5e (patch)
treeb022a359c65d82744028e2ee4be4cde931320646 /tests
parent56ae9b880fadf625d4acac3929d7e786c5a461d3 (diff)
Fix path for downloaded cheats (#493)
Diffstat (limited to 'tests')
-rwxr-xr-xtests/run20
1 files changed, 11 insertions, 9 deletions
diff --git a/tests/run b/tests/run
index ec4fd61..b582b71 100755
--- a/tests/run
+++ b/tests/run
@@ -111,8 +111,10 @@ _integration() {
sleep 1
tmux send-key -t ci "Enter"
+ echoerr "Checking paths..."
sleep 2
- cat "$log_file" | tail -n10 | grep -q "/navi"
+ local -r downloaded_path="$(cat "$log_file" | grep 'They are now located at' | sed 's/They are now located at //')"
+ ls "$downloaded_path" | grep -q '^pkg_mgr__brew.cheat$'
}
if ! command_exists fzf; then
@@ -140,19 +142,19 @@ for i in $(_get_tests "$filter"); do
test::run "$query" _navi_cases_test "$query" "$expected"
done
-test::set_suite "3rd party"
-test::run "tldr" _navi_tldr
-test::run "cheatsh" _navi_cheatsh
+test::set_suite "info"
+test::run "cheats_path" _navi_cheatspath
+
+test::set_suite "integration"
+test::run "welcome->pwd" _integration
test::set_suite "widget"
test::run "bash" _navi_widget "bash"
test::run "zsh" _navi_widget "zsh"
test::run "zsh" _navi_widget "fish"
-test::set_suite "info"
-test::run "cheats_path" _navi_cheatspath
-
-test::set_suite "integration"
-test::run "welcome->pwd" _integration
+test::set_suite "3rd party"
+test::run "tldr" _navi_tldr
+test::run "cheatsh" _navi_cheatsh
test::finish