# HG changeset patch # User Stephen J. Turnbull # Date 1312779439 -32400 # Node ID eed303fac325474bdac43f06c0ff8004805a92c1 # Parent 4307b8e5998c69fd69d809507d075f9ba110e6b8 Should tests for substitute-in-file-name be in syntax-tests? diff -r 4307b8e5998c -r eed303fac325 tests/ChangeLog --- a/tests/ChangeLog Mon Aug 08 13:57:19 2011 +0900 +++ b/tests/ChangeLog Mon Aug 08 13:57:19 2011 +0900 @@ -1,3 +1,12 @@ +2011-08-06 Stephen J. Turnbull + + * automated/os-tests.el: + * automated/syntax-tests.el: + Move tests of `substitute-in-file-name' from syntax to os. + + * automated/syntax-tests.el: + Add lisp-maint required file terminator. + 2011-07-31 Mats Lidell * automated/process-tests.el: shell-command tests. diff -r 4307b8e5998c -r eed303fac325 tests/automated/os-tests.el --- a/tests/automated/os-tests.el Mon Aug 08 13:57:19 2011 +0900 +++ b/tests/automated/os-tests.el Mon Aug 08 13:57:19 2011 +0900 @@ -89,4 +89,38 @@ (Assert (looking-at result)))) (do-test (car case) (cdr case))))))) +(loop + with envvar-not-existing = (symbol-name (gensym "whatever")) + with envvar-existing = (symbol-name (gensym "whatever")) + with envvar-existing-val = (make-string #x10000 ?\xe1) + with examples = + (list (list (format "%chome%cwhatever%c%chi-there%c$%s" + directory-sep-char + directory-sep-char + directory-sep-char + directory-sep-char + directory-sep-char + envvar-existing) + (format "%chi-there%c%s" + directory-sep-char + directory-sep-char + envvar-existing-val)) + (if (memq system-type '(windows-nt cygwin32)) + '("//network-path/c$" "//network-path/c$") + '("/network-path/c$" "/network-path/c$")) + (list (format "/home/whoever/$%s" envvar-not-existing) + (format "/home/whoever/$%s" envvar-not-existing)) + (list (format "/home/whoever/$%s" envvar-existing) + (format "/home/whoever/%s" envvar-existing-val)) + (list (format "/home/whoever/${%s}" envvar-existing) + (format "/home/whoever/%s" envvar-existing-val)) + (list (format "/home/whoever/${%s}" envvar-not-existing) + (format "/home/whoever/${%s}" envvar-not-existing))) + initially (progn (setenv envvar-not-existing nil t) + (setenv envvar-existing envvar-existing-val)) + for (pre post) + in examples + do + (Assert (string= post (substitute-in-file-name pre)))) + ;;; end of os-tests.el diff -r 4307b8e5998c -r eed303fac325 tests/automated/syntax-tests.el --- a/tests/automated/syntax-tests.el Mon Aug 08 13:57:19 2011 +0900 +++ b/tests/automated/syntax-tests.el Mon Aug 08 13:57:19 2011 +0900 @@ -204,37 +204,4 @@ ;; special-case check that point didn't move (Assert (= (point) 25)))) -(loop - with envvar-not-existing = (symbol-name (gensym "whatever")) - with envvar-existing = (symbol-name (gensym "whatever")) - with envvar-existing-val = (make-string #x10000 ?\xe1) - with examples = - (list (list (format "%chome%cwhatever%c%chi-there%c$%s" - directory-sep-char - directory-sep-char - directory-sep-char - directory-sep-char - directory-sep-char - envvar-existing) - (format "%chi-there%c%s" - directory-sep-char - directory-sep-char - envvar-existing-val)) - (if (memq system-type '(windows-nt cygwin32)) - '("//network-path/c$" "//network-path/c$") - '("/network-path/c$" "/network-path/c$")) - (list (format "/home/whoever/$%s" envvar-not-existing) - (format "/home/whoever/$%s" envvar-not-existing)) - (list (format "/home/whoever/$%s" envvar-existing) - (format "/home/whoever/%s" envvar-existing-val)) - (list (format "/home/whoever/${%s}" envvar-existing) - (format "/home/whoever/%s" envvar-existing-val)) - (list (format "/home/whoever/${%s}" envvar-not-existing) - (format "/home/whoever/${%s}" envvar-not-existing))) - initially (progn (setenv envvar-not-existing nil t) - (setenv envvar-existing envvar-existing-val)) - for (pre post) - in examples - do - (Assert (string= post (substitute-in-file-name pre)))) - +;;; end of syntax-tests.el