comparison tests/automated/syntax-tests.el @ 5540:eed303fac325

Should tests for substitute-in-file-name be in syntax-tests?
author Stephen J. Turnbull <stephen@xemacs.org>
date Mon, 08 Aug 2011 13:57:19 +0900
parents 308d34e9f07d
children fbe90e6f7a43
comparison
equal deleted inserted replaced
5539:4307b8e5998c 5540:eed303fac325
202 "Unbalanced parentheses" 202 "Unbalanced parentheses"
203 (backward-up-list-moves-point-from-to 25 nil)) 203 (backward-up-list-moves-point-from-to 25 nil))
204 ;; special-case check that point didn't move 204 ;; special-case check that point didn't move
205 (Assert (= (point) 25)))) 205 (Assert (= (point) 25))))
206 206
207 (loop 207 ;;; end of syntax-tests.el
208 with envvar-not-existing = (symbol-name (gensym "whatever"))
209 with envvar-existing = (symbol-name (gensym "whatever"))
210 with envvar-existing-val = (make-string #x10000 ?\xe1)
211 with examples =
212 (list (list (format "%chome%cwhatever%c%chi-there%c$%s"
213 directory-sep-char
214 directory-sep-char
215 directory-sep-char
216 directory-sep-char
217 directory-sep-char
218 envvar-existing)
219 (format "%chi-there%c%s"
220 directory-sep-char
221 directory-sep-char
222 envvar-existing-val))
223 (if (memq system-type '(windows-nt cygwin32))
224 '("//network-path/c$" "//network-path/c$")
225 '("/network-path/c$" "/network-path/c$"))
226 (list (format "/home/whoever/$%s" envvar-not-existing)
227 (format "/home/whoever/$%s" envvar-not-existing))
228 (list (format "/home/whoever/$%s" envvar-existing)
229 (format "/home/whoever/%s" envvar-existing-val))
230 (list (format "/home/whoever/${%s}" envvar-existing)
231 (format "/home/whoever/%s" envvar-existing-val))
232 (list (format "/home/whoever/${%s}" envvar-not-existing)
233 (format "/home/whoever/${%s}" envvar-not-existing)))
234 initially (progn (setenv envvar-not-existing nil t)
235 (setenv envvar-existing envvar-existing-val))
236 for (pre post)
237 in examples
238 do
239 (Assert (string= post (substitute-in-file-name pre))))
240