1
0
Fork 0

Fix tests by including ‘subr-x’

‘string-empty-p’ is defined in ‘subr-x’ and this library isn’t loaded into Emacs
by default.
This commit is contained in:
Tom Willemse 2020-04-08 23:51:59 -07:00
parent dcffe90e3c
commit 0d8c294865
5 changed files with 22 additions and 17 deletions

View file

@ -1,7 +1,8 @@
#!/usr/bin/env bats
@test "Opening Emacs loads oni-company" {
@test "Loading company loads oni-company" {
run emacs -batch -l package -f package-initialize \
-l company \
-eval "(prin1 (featurep 'oni-company))"
echo "$output"
@ -9,8 +10,9 @@
[[ "$output" == *"t" ]]
}
@test "Opening Emacs diminishes company-mode" {
run emacs -batch -l package -f package-initialize \
@test "Loading company diminishes company-mode" {
run emacs -batch -l package -f package-initialize -l subr-x \
-l company \
-eval "(prin1 (string-empty-p (car (alist-get 'company-mode minor-mode-alist))))"
echo "$output"
@ -19,7 +21,8 @@
}
@test "Reloading company diminishes company-mode" {
run emacs -batch -l package -f package-initialize \
run emacs -batch -l package -f package-initialize -l subr-x \
-l company \
-eval "(load-library \"company\")" \
-eval "(prin1 (string-empty-p (car (alist-get 'company-mode minor-mode-alist))))"
@ -28,8 +31,9 @@
[[ "$output" == *"t" ]]
}
@test "Opening Emacs diminishes company-posframe-mode" {
run emacs -batch -l package -f package-initialize \
@test "Loading company-posframe diminishes company-posframe-mode" {
run emacs -batch -l package -f package-initialize -l subr-x \
-l company-posframe \
-eval "(prin1 (string-empty-p (car (alist-get 'company-posframe-mode minor-mode-alist))))"
echo "$output"
@ -38,7 +42,8 @@
}
@test "Reloading company-posframe diminishes company-posframe-mode" {
run emacs -batch -l package -f package-initialize \
run emacs -batch -l package -f package-initialize -l subr-x \
-l company-posframe \
-eval "(load-library \"company-posframe\")" \
-eval "(prin1 (string-empty-p (car (alist-get 'company-posframe-mode minor-mode-alist))))"

View file

@ -11,7 +11,7 @@
}
@test "Loading counsel diminishes counsel-mode" {
run emacs -batch -l package -f package-initialize \
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))))"
@ -21,7 +21,7 @@
}
@test "Reloading counsel diminishes counsel-mode" {
run emacs -batch -l package -f package-initialize \
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))))"

View file

@ -10,7 +10,7 @@
}
@test "Opening emacs diminishes ivy-mode" {
run emacs -batch -l package -f package-initialize \
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"
@ -19,7 +19,7 @@
}
@test "Reloading ivy diminishes ivy-mode" {
run emacs -batch -l package -f package-initialize \
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))))"
@ -29,7 +29,7 @@
}
@test "Opening emacs diminishes ivy-posframe-mode" {
run emacs -batch -l package -f package-initialize \
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"
@ -38,7 +38,7 @@
}
@test "Reloading ivy-posframe diminishes ivy-posframe-mode" {
run emacs -batch -l package -f package-initialize \
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))))"

View file

@ -11,7 +11,7 @@
}
@test "Loading paredit diminishes paredit-mode" {
run emacs -batch -l package -f package-initialize \
run emacs -batch -l package -f package-initialize -l subr-x \
-l paredit \
-eval "(prin1 (string-empty-p (car (alist-get 'paredit-mode minor-mode-alist))))"
@ -21,7 +21,7 @@
}
@test "Reloading paredit diminishes paredit-mode" {
run emacs -batch -l package -f package-initialize \
run emacs -batch -l package -f package-initialize -l subr-x \
-l paredit \
-eval "(load-library \"paredit\")" \
-eval "(prin1 (string-empty-p (car (alist-get 'paredit-mode minor-mode-alist))))"

View file

@ -10,7 +10,7 @@
}
@test "Opening Emacs diminishes yas-minor-mode" {
run emacs -batch -l package -f package-initialize \
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"
@ -19,7 +19,7 @@
}
@test "Reloading yasnippet diminishes yas-minor-mode" {
run emacs -batch -l package -f package-initialize \
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))))"