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

53 lines
1.5 KiB
Bash

#!/usr/bin/env bats
@test "Loading company loads oni-company" {
run emacs -batch -l package -f package-initialize \
-l company \
-eval "(prin1 (featurep 'oni-company))"
echo "$output"
[[ "$output" == *"t" ]]
}
@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"
[[ "$output" == *"t" ]]
}
@test "Reloading company diminishes company-mode" {
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))))"
echo "$output"
[[ "$output" == *"t" ]]
}
@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"
[[ "$output" == *"t" ]]
}
@test "Reloading company-posframe diminishes company-posframe-mode" {
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))))"
echo "$output"
[[ "$output" == *"t" ]]
}