Skip to content

Commit

Permalink
Merge pull request #4 from miles170/update-tests
Browse files Browse the repository at this point in the history
emacs: update tests
  • Loading branch information
miles170 authored Sep 6, 2023
2 parents e2cb7f4 + b964919 commit 83abd71
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,4 @@ jobs:
run: brew install Formula/emacs.rb ${{ matrix.build_opts }}

- name: Test installation
run: |
brew test Formula/emacs.rb
test=json-available-p
[[ '${{ matrix.build_opts }}' == '--with-native-comp' ]] && test=native-comp-available-p
$(brew --prefix)/bin/emacs --batch --eval="(unless (${test}) (error (kill-emacs 1)))"
run: brew test Formula/emacs.rb
6 changes: 6 additions & 0 deletions Formula/emacs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,11 @@ def install

test do
assert_equal "4", shell_output("#{bin}/emacs --batch --eval=\"(print (+ 2 2))\"").strip
assert_equal "t", shell_output("#{bin}/emacs --batch --eval=\"(print (json-available-p))\"").strip
assert_equal "t", shell_output("#{bin}/emacs --batch --eval=\"(print (sqlite-available-p))\"").strip

if build.with? "native-comp"
assert_equal "t", shell_output("#{bin}/emacs --batch --eval=\"(print (native-comp-available-p))\"").strip
end
end
end

0 comments on commit 83abd71

Please sign in to comment.