2020-01-13 00:34:34 +01:00
|
|
|
#!/usr/bin/env bats
|
|
|
|
|
|
|
|
@test "Opening a .conf file loads oni-conf" {
|
|
|
|
run emacs -batch -l package -f package-initialize \
|
|
|
|
-visit test.conf \
|
|
|
|
-eval "(prin1 (featurep 'oni-conf))"
|
|
|
|
|
|
|
|
echo "$output"
|
|
|
|
|
2021-02-09 07:30:54 +01:00
|
|
|
[[ "$output" == *"t" ]]
|
|
|
|
}
|
|
|
|
|
|
|
|
@test "Opening a .service file enables conf-mode" {
|
|
|
|
run emacs -batch -l package -f package-initialize \
|
|
|
|
-visit test.service \
|
2021-02-09 18:52:28 +01:00
|
|
|
-eval "(prin1 (not (null (derived-mode-p major-mode 'conf-mode))))"
|
2021-02-09 07:30:54 +01:00
|
|
|
|
|
|
|
echo "$output"
|
|
|
|
|
|
|
|
[[ "$output" == *"t" ]]
|
2020-01-13 00:34:34 +01:00
|
|
|
}
|