[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/devil 9536f7da2f 1/2: Simplify sentence-end tests
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/devil 9536f7da2f 1/2: Simplify sentence-end tests |
Date: |
Tue, 13 Jun 2023 10:00:03 -0400 (EDT) |
branch: elpa/devil
commit 9536f7da2f4cbc601d0e6c8b470beec5576d309b
Author: Morgan Willcock <morgan@ice9.digital>
Commit: Morgan Willcock <morgan@ice9.digital>
Simplify sentence-end tests
Remove sub-shells and variables, and instead just check the return
code. A return code of 1 means that nothing matched and there was no
error.
---
Makefile | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index d4b048c378..e147460842 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,10 @@
checks: tests test-sentence-ends
test-sentence-ends:
- errors=$$(grep -n '[^0-9]\. [^ lswxz.,"(]' MANUAL.org); echo
"$$errors"; [ -z "$$errors" ]
- errors=$$(grep -n '\. [^ a]' README.org CHANGES.org LICENSE.org); echo
"$$errors"; [ -z "$$errors" ]
- errors=$$(grep -n '\. [^ m]' *.el); echo "$$errors"; [ -z "$$errors" ]
- errors=$$(grep -n '[?!] [^ ]' *.org *.el); echo "$$errors"; [ -z
"$$errors" ]
+ grep -n '[^0-9]\. [^ lswxz.,"(]' MANUAL.org; [ $$? = 1 ]
+ grep -n '\. [^ a]' README.org CHANGES.org LICENSE.org; [ $$? = 1 ]
+ grep -n '\. [^ m]' *.el; [ $$? = 1 ]
+ grep -n '[?!] [^ ]' *.org *.el; [ $$? = 1 ]
tests:
emacs --batch -l devil.el -l devil-tests.el -f
ert-run-tests-batch-and-exit