1
0
Fork 0
emacs-config/test/integration/oni-ivy.bats
Tom Willemse 0d8c294865 Fix tests by including ‘subr-x’
‘string-empty-p’ is defined in ‘subr-x’ and this library isn’t loaded into Emacs
by default.
2020-04-08 23:51:59 -07:00

48 lines
1.3 KiB
Bash

#!/usr/bin/env bats
@test "Opening emacs loads oni-ivy" {
run emacs -batch -l package -f package-initialize \
-eval "(prin1 (featurep 'oni-ivy))"
echo "$output"
[[ "$output" == *"t" ]]
}
@test "Opening emacs diminishes ivy-mode" {
run emacs -batch -l package -f package-initialize -l subr-x \
-eval "(prin1 (string-empty-p (car (alist-get 'ivy-mode minor-mode-alist))))"
echo "$output"
[[ "$output" == *"t" ]]
}
@test "Reloading ivy diminishes ivy-mode" {
run emacs -batch -l package -f package-initialize -l subr-x \
-eval "(load-library \"ivy\")" \
-eval "(prin1 (string-empty-p (car (alist-get 'ivy-mode minor-mode-alist))))"
echo "$output"
[[ "$output" == *"t" ]]
}
@test "Opening emacs diminishes ivy-posframe-mode" {
run emacs -batch -l package -f package-initialize -l subr-x \
-eval "(prin1 (string-empty-p (car (alist-get 'ivy-posframe-mode minor-mode-alist))))"
echo "$output"
[[ "$output" == *"t" ]]
}
@test "Reloading ivy-posframe diminishes ivy-posframe-mode" {
run emacs -batch -l package -f package-initialize -l subr-x \
-eval "(load-library \"ivy-posframe\")" \
-eval "(prin1 (string-empty-p (car (alist-get 'ivy-posframe-mode minor-mode-alist))))"
echo "$output"
[[ "$output" == *"t" ]]
}