summaryrefslogtreecommitdiff
path: root/tests/test-title-case-region.el.disabled
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-10-12 11:47:26 -0500
committerCraig Jennings <c@cjennings.net>2025-10-12 11:47:26 -0500
commit092304d9e0ccc37cc0ddaa9b136457e56a1cac20 (patch)
treeea81999b8442246c978b364dd90e8c752af50db5 /tests/test-title-case-region.el.disabled
changing repositories
Diffstat (limited to 'tests/test-title-case-region.el.disabled')
-rw-r--r--tests/test-title-case-region.el.disabled44
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/test-title-case-region.el.disabled b/tests/test-title-case-region.el.disabled
new file mode 100644
index 00000000..ffab0c24
--- /dev/null
+++ b/tests/test-title-case-region.el.disabled
@@ -0,0 +1,44 @@
+;;; test-title-case-region.el --- -*- lexical-binding: t; -*-
+
+;;; Commentary:
+;; Tests for the title-case region function in custom-functions.el
+
+;; Note on Title Case
+;; Title case is a capitalization convention where major words are
+;; capitalized,and most minor words are lowercase. Nouns,verbs (including
+;; linking verbs), adjectives, adverbs,pronouns,and all words of four letters or
+;; more are considered major words. Short (i.e., three letters or fewer)
+;; conjunctions, short prepositions,and all articles are considered minor
+;; words."
+
+;; positive case (single line, all lowercase, no skip words)
+;; positive case (six lines, mixed case, skip words)
+;; negative case (single line, all skip-words)
+;; negative case (a long empty string)
+
+
+;;; Code:
+
+(require 'ert)
+(add-to-list 'load-path (concat user-emacs-directory "modules"))
+(require 'custom-functions)
+
+(ert-deftest test-cj/fixup-whitespace-positive-first-line-only ()
+ "Test a positive case with two lines.
+Both lines have whitespace at the beginning and the end. This tests that when
+this function is called on the first line, only that line is affected."
+ (let ((testdata " Hello, world! \n Foo bar ")
+ (expected "Hello, world!\n Foo bar ")
+ (actual))
+ (with-temp-buffer
+ (insert testdata)
+ (goto-char (point-min))
+ (cj/fixup-whitespace-line-or-region)
+ (setq actual (buffer-string))
+ (should (string= actual expected)))))
+
+
+
+
+(provide 'test-title-case-region)
+;;; test-title-case-region.el ends here.