[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 158fd83 16/28: Test the trimming function.
From: |
Jackson Ray Hamilton |
Subject: |
[elpa] master 158fd83 16/28: Test the trimming function. |
Date: |
Tue, 05 May 2015 11:10:21 +0000 |
branch: master
commit 158fd8328570250fcaafcdf77c1f08a72fe99b62
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>
Test the trimming function.
---
test/context-coloring-test.el | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/test/context-coloring-test.el b/test/context-coloring-test.el
index e52886e..8600e06 100644
--- a/test/context-coloring-test.el
+++ b/test/context-coloring-test.el
@@ -320,9 +320,21 @@ FOREGROUND. Apply ARGUMENTS to
(when (not error-signaled-p)
(ert-fail "Expected an error to be thrown, but there wasn't."))))
+(defun context-coloring-test-assert-trimmed (result expected)
+ (when (not (string-equal result expected))
+ (ert-fail "Expected string to be trimmed, but it wasn't.")))
+
;;; The tests
+(ert-deftest context-coloring-test-trim ()
+ (context-coloring-test-assert-trimmed (context-coloring-trim "") "")
+ (context-coloring-test-assert-trimmed (context-coloring-trim " ") "")
+ (context-coloring-test-assert-trimmed (context-coloring-trim "a") "a")
+ (context-coloring-test-assert-trimmed (context-coloring-trim " a") "a")
+ (context-coloring-test-assert-trimmed (context-coloring-trim "a ") "a")
+ (context-coloring-test-assert-trimmed (context-coloring-trim " a ") "a"))
+
(ert-deftest-async context-coloring-test-async-mode-startup (done)
(context-coloring-test-with-fixture-async
"./fixtures/empty"
- [elpa] master 85ff3ef 13/28: Trailing whitespace, empty arrays, empty strings., (continued)
- [elpa] master 85ff3ef 13/28: Trailing whitespace, empty arrays, empty strings., Jackson Ray Hamilton, 2015/05/05
- [elpa] master f11f97f 09/28: Make default colors more like font-lock's., Jackson Ray Hamilton, 2015/05/05
- [elpa] master a7f5970 04/28: Remove unused function., Jackson Ray Hamilton, 2015/05/05
- [elpa] master 9873030 08/28: Use real keywords., Jackson Ray Hamilton, 2015/05/05
- [elpa] master 0888e06 01/28: Use Cask and Coveralls., Jackson Ray Hamilton, 2015/05/05
- [elpa] master 202ca74 15/28: Drop `subr-x' dependency., Jackson Ray Hamilton, 2015/05/05
- [elpa] master dd3fe3c 06/28: Fix badges., Jackson Ray Hamilton, 2015/05/05
- [elpa] master fb53884 17/28: Update README., Jackson Ray Hamilton, 2015/05/05
- [elpa] master 52da59c 18/28: Bust cache., Jackson Ray Hamilton, 2015/05/05
- [elpa] master 3f63fab 11/28: Add local coverage configuration., Jackson Ray Hamilton, 2015/05/05
- [elpa] master 158fd83 16/28: Test the trimming function.,
Jackson Ray Hamilton <=
- [elpa] master 0c20edf 14/28: Add coverage for missing lines., Jackson Ray Hamilton, 2015/05/05
- [elpa] master d116055 12/28: Fix original-maximum-face restoration bug., Jackson Ray Hamilton, 2015/05/05
- [elpa] master 1b6f6fb 21/28: Cleanup README., Jackson Ray Hamilton, 2015/05/05
- [elpa] master 5dd3035 19/28: Refactor trim functions., Jackson Ray Hamilton, 2015/05/05
- [elpa] master f8cfd37 22/28: Double-space., Jackson Ray Hamilton, 2015/05/05
- [elpa] master 64852e7 24/28: Update library headers., Jackson Ray Hamilton, 2015/05/05
- [elpa] master 55ca15a 23/28: Guard against excessively lenghty nodes., Jackson Ray Hamilton, 2015/05/05
- [elpa] master 8f1af4a 20/28: Update library header., Jackson Ray Hamilton, 2015/05/05
- [elpa] master dbddc45 26/28: Reimplement coverage reporter in elisp., Jackson Ray Hamilton, 2015/05/05
- [elpa] master 6ee3f82 25/28: Refactor coverage., Jackson Ray Hamilton, 2015/05/05