File tree Expand file tree Collapse file tree 2 files changed +20
-11
lines changed
Expand file tree Collapse file tree 2 files changed +20
-11
lines changed Original file line number Diff line number Diff line change 1+ 2025-11-17 Mats Lidell <matsl@gnu.org>
2+
3+ * test/hpath-tests.el
4+ (hpath:path-at-point-with-unbalanced-quote-on-same-line):
5+ Rename test. Track current behavior.
6+
172025-11-16 Mats Lidell <matsl@gnu.org>
28
39* test/hpath-tests.el (hpath--hpath:delimited-possible-path-in-ls-R):
Original file line number Diff line number Diff line change 33; ; Author: Mats Lidell <matsl@gnu.org>
44; ;
55; ; Orig-Date: 28-Feb-21 at 23:26:00
6- ; ; Last-Mod: 16 -Nov-25 at 23:23:37 by Mats Lidell
6+ ; ; Last-Mod: 17 -Nov-25 at 16:40:58 by Mats Lidell
77; ;
88; ; SPDX-License-Identifier: GPL-3.0-or-later
99; ;
126126 (goto-char 7 )
127127 (should (not (hpath:at-p)))))
128128
129- (ert-deftest hpath:path-at-point-finds-path-when-unbalanced-quote-on-same-line ()
130- " Find path at point finds a path even with unbalanced quotes on same line."
131- :expected-result :failed
132- (dolist (v '((" \" /tmp\" " ) ; Reference case: no quotes
133- (" \" /tmp\" \" " ) ; Quote after: Works
134- (" \" \" /tmp\" " ))) ; Quote before: FAILS
135- (with-temp-buffer
136- (insert (format " %s \n " v))
137- (goto-char 6 )
138- (should (string= (hpath:at-p nil t ) " /tmp" )))))
129+ (ert-deftest hpath:path-at-point-with-unbalanced-quote-on-same-line ()
130+ " Verify `hpath:at-p' behavior when there is an unbalanced quotes on same line."
131+ (dolist (v '((" \" /tmp\" " . t )
132+ (" \" /tmp\" \" " . t )
133+ (" \" \" /tmp\" " . nil )))
134+ (let ((text (car v))
135+ (find (cdr v)))
136+ (with-temp-buffer
137+ (insert (format " %s \n " v))
138+ (goto-char 6 )
139+ (if find
140+ (should (string= (hpath:at-p nil t ) " /tmp" ))
141+ (should-not (hpath:at-p nil t )))))))
139142
140143(ert-deftest hpath:find-exec-shell-cmd-test ()
141144 " Path prefix ! will run pathname as a non windowed program."
You can’t perform that action at this time.
0 commit comments