From 0d8c29486579a37823d25dcb968d0144c9d200e4 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 8 Apr 2020 23:51:59 -0700 Subject: [PATCH] =?UTF-8?q?Fix=20tests=20by=20including=20=E2=80=98subr-x?= =?UTF-8?q?=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ‘string-empty-p’ is defined in ‘subr-x’ and this library isn’t loaded into Emacs by default. --- test/integration/oni-company.bats | 19 ++++++++++++------- test/integration/oni-counsel.bats | 4 ++-- test/integration/oni-ivy.bats | 8 ++++---- test/integration/oni-paredit.bats | 4 ++-- test/integration/oni-yasnippet.bats | 4 ++-- 5 files changed, 22 insertions(+), 17 deletions(-) diff --git a/test/integration/oni-company.bats b/test/integration/oni-company.bats index edb135a..45dd8d6 100644 --- a/test/integration/oni-company.bats +++ b/test/integration/oni-company.bats @@ -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))))" diff --git a/test/integration/oni-counsel.bats b/test/integration/oni-counsel.bats index 99050b5..cda2860 100644 --- a/test/integration/oni-counsel.bats +++ b/test/integration/oni-counsel.bats @@ -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))))" diff --git a/test/integration/oni-ivy.bats b/test/integration/oni-ivy.bats index df68095..a284f58 100644 --- a/test/integration/oni-ivy.bats +++ b/test/integration/oni-ivy.bats @@ -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))))" diff --git a/test/integration/oni-paredit.bats b/test/integration/oni-paredit.bats index 63b36a8..9bb6161 100644 --- a/test/integration/oni-paredit.bats +++ b/test/integration/oni-paredit.bats @@ -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))))" diff --git a/test/integration/oni-yasnippet.bats b/test/integration/oni-yasnippet.bats index 4784cb8..ba31f06 100644 --- a/test/integration/oni-yasnippet.bats +++ b/test/integration/oni-yasnippet.bats @@ -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))))"