1
0
Fork 0
emacs-config/test/integration/oni-counsel.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

32 lines
846 B
Bash

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