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

29 lines
795 B
Bash

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