]> git.eshelyaron.com Git - emacs.git/commitdiff
Minor tweak in a dired test
authorTino Calancha <tino.calancha@gmail.com>
Sun, 6 Aug 2017 13:16:56 +0000 (22:16 +0900)
committerTino Calancha <tino.calancha@gmail.com>
Sun, 6 Aug 2017 13:16:56 +0000 (22:16 +0900)
* test/lisp/dired-tests.el (dired-test-bug27968):
Ensure the new header has different length than the original one.

test/lisp/dired-tests.el

index 105a79f0014d8efa0e5e80cc7ff532d8781d2483..981afdd929ee7c12c5d44dd313d442860462e1c1 100644 (file)
           (save-excursion
             (goto-char 1)
             (forward-line 1)
-            (let ((inhibit-read-only t))
+            (let ((inhibit-read-only t)
+                  (new-header "  test-bug27968"))
               (delete-region (point) (point-at-eol))
-              (insert "  test-bug27968")))
+              (when (= orig-len (length new-header))
+                ;; Wow lucky guy! I must buy lottery today.
+                (setq new-header (concat new-header " :-)")))
+              (insert new-header)))
           (setq len (funcall header-len-fn)
                 diff (- len orig-len))
           (should-not (zerop diff)) ; Header length has changed.