diff options
| author | Joakim Verona | 2012-05-21 00:37:29 +0200 |
|---|---|---|
| committer | Joakim Verona | 2012-05-21 00:37:29 +0200 |
| commit | 74f082445c1dd0c92d5bb187db0d50287e3a7bae (patch) | |
| tree | 48e3d8fd9df3876665654eab9bcf96ec492a31e9 /test | |
| parent | 52862ad482e030e4d54cd7d6e250d76e59ee0554 (diff) | |
| parent | 1b170bc63c2f3a3fbe6ba6996d5a015e82634909 (diff) | |
| download | emacs-74f082445c1dd0c92d5bb187db0d50287e3a7bae.tar.gz emacs-74f082445c1dd0c92d5bb187db0d50287e3a7bae.zip | |
upstream, fix conflicts
Diffstat (limited to 'test')
| -rw-r--r-- | test/ChangeLog | 15 | ||||
| -rw-r--r-- | test/automated/url-util-tests.el | 51 | ||||
| -rw-r--r-- | test/indent/ruby.rb | 19 | ||||
| -rwxr-xr-x | test/indent/shell.rc | 9 | ||||
| -rwxr-xr-x | test/indent/shell.sh | 4 |
5 files changed, 96 insertions, 2 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 66f8592c79c..f05c94152a3 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,3 +1,18 @@ | |||
| 1 | 2012-05-15 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 2 | |||
| 3 | * automated/url-util-tests.el: New file to test | ||
| 4 | lisp/url/url-util.el. Only `url-build-query-string' and | ||
| 5 | `url-parse-query-string' are tested right now (Bug#8706). | ||
| 6 | |||
| 7 | 2012-04-28 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 8 | |||
| 9 | * indent/shell.sh: | ||
| 10 | * indent/shell.rc: Ad some test cases. | ||
| 11 | |||
| 12 | 2012-04-24 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 13 | |||
| 14 | * indent/ruby.rb: New file, to test new syntax-propertize code. | ||
| 15 | |||
| 1 | 2012-04-11 Glenn Morris <rgm@gnu.org> | 16 | 2012-04-11 Glenn Morris <rgm@gnu.org> |
| 2 | 17 | ||
| 3 | * automated/vc-bzr.el (vc-bzr-test-faulty-bzr-autoloads): New test. | 18 | * automated/vc-bzr.el (vc-bzr-test-faulty-bzr-autoloads): New test. |
diff --git a/test/automated/url-util-tests.el b/test/automated/url-util-tests.el new file mode 100644 index 00000000000..65eb37ce926 --- /dev/null +++ b/test/automated/url-util-tests.el | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | ;;; url-util-tests.el --- Test suite for url-util. | ||
| 2 | |||
| 3 | ;; Copyright (C) 2012 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; Author: Teodor Zlatanov <tzz@lifelogs.com> | ||
| 6 | ;; Keywords: data | ||
| 7 | |||
| 8 | ;; This file is part of GNU Emacs. | ||
| 9 | |||
| 10 | ;; GNU Emacs is free software: you can redistribute it and/or modify | ||
| 11 | ;; it under the terms of the GNU General Public License as published by | ||
| 12 | ;; the Free Software Foundation, either version 3 of the License, or | ||
| 13 | ;; (at your option) any later version. | ||
| 14 | |||
| 15 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 16 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 18 | ;; GNU General Public License for more details. | ||
| 19 | |||
| 20 | ;; You should have received a copy of the GNU General Public License | ||
| 21 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 22 | |||
| 23 | ;;; Code: | ||
| 24 | |||
| 25 | (require 'ert) | ||
| 26 | (require 'url-util) | ||
| 27 | |||
| 28 | (ert-deftest url-util-tests () | ||
| 29 | (let ((tests | ||
| 30 | '(("key1=val1&key2=val2&key3=val1&key3=val2&key4&key5" | ||
| 31 | ((key1 val1) (key2 "val2") (key3 val1 val2) (key4) (key5 ""))) | ||
| 32 | ("key1=val1;key2=val2;key3=val1;key3=val2;key4;key5" | ||
| 33 | ((key1 "val1") (key2 val2) (key3 val1 val2) ("key4") (key5 "")) t) | ||
| 34 | ("key1=val1;key2=val2;key3=val1;key3=val2;key4=;key5=" | ||
| 35 | ((key1 val1) (key2 val2) ("key3" val1 val2) (key4) (key5 "")) t t))) | ||
| 36 | test) | ||
| 37 | (while tests | ||
| 38 | (setq test (car tests) | ||
| 39 | tests (cdr tests)) | ||
| 40 | (should (equal (apply 'url-build-query-string (cdr test)) (car test))))) | ||
| 41 | (should (equal (url-parse-query-string | ||
| 42 | "key1=val1&key2=val2&key3=val1&key3=val2&key4=&key5") | ||
| 43 | '(("key5" "") | ||
| 44 | ("key4" "") | ||
| 45 | ("key3" "val2" "val1") | ||
| 46 | ("key2" "val2") | ||
| 47 | ("key1" "val1"))))) | ||
| 48 | |||
| 49 | (provide 'url-util-tests) | ||
| 50 | |||
| 51 | ;;; url-util-tests.el ends here | ||
diff --git a/test/indent/ruby.rb b/test/indent/ruby.rb new file mode 100644 index 00000000000..c4a747a1c78 --- /dev/null +++ b/test/indent/ruby.rb | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | # Don't mis-match "sub" at the end of words. | ||
| 2 | a = asub / aslb + bsub / bslb; | ||
| 3 | |||
| 4 | b = %Q{This is a "string"} | ||
| 5 | c = %w(foo | ||
| 6 | bar | ||
| 7 | baz) | ||
| 8 | d = %!hello! | ||
| 9 | |||
| 10 | # A "do" after a slash means that slash is not a division, but it doesn't imply | ||
| 11 | # it's a regexp-ender, since it can be a regexp-starter instead! | ||
| 12 | x = toto / foo; if /do bar/ then | ||
| 13 | toto = 1 | ||
| 14 | end | ||
| 15 | |||
| 16 | # Some Cucumber code: | ||
| 17 | Given /toto/ do | ||
| 18 | print "hello" | ||
| 19 | end | ||
diff --git a/test/indent/shell.rc b/test/indent/shell.rc index 841223555b9..e5c63e335b9 100755 --- a/test/indent/shell.rc +++ b/test/indent/shell.rc | |||
| @@ -1,7 +1,10 @@ | |||
| 1 | #!/bin/rc | 1 | #!/bin/rc |
| 2 | 2 | ||
| 3 | if (foo) { | 3 | if (foo) { |
| 4 | echo 1 | 4 | echo 1 \ |
| 5 | toto \ | ||
| 6 | tutu | ||
| 7 | titi | ||
| 5 | } | 8 | } |
| 6 | if not { | 9 | if not { |
| 7 | echo 2 | 10 | echo 2 |
| @@ -23,6 +26,10 @@ switch ($a) { | |||
| 23 | for (i in a b c) | 26 | for (i in a b c) |
| 24 | echo "$i" # KNOWN INDENT BUG | 27 | echo "$i" # KNOWN INDENT BUG |
| 25 | echo titi | 28 | echo titi |
| 29 | if (foo) | ||
| 30 | echo 3 # KNOWN INDENT BUG | ||
| 31 | if not | ||
| 32 | echo 4 # KNOWN INDENT BUG | ||
| 26 | 33 | ||
| 27 | case * | 34 | case * |
| 28 | echo other | 35 | echo other |
diff --git a/test/indent/shell.sh b/test/indent/shell.sh index 89f47d0bfe3..26a01dc3bda 100755 --- a/test/indent/shell.sh +++ b/test/indent/shell.sh | |||
| @@ -13,6 +13,7 @@ foo () { | |||
| 13 | case toto | 13 | case toto |
| 14 | in a) hello # KNOWN INDENT BUG | 14 | in a) hello # KNOWN INDENT BUG |
| 15 | ;; b) hi # KNOWN INDENT BUG | 15 | ;; b) hi # KNOWN INDENT BUG |
| 16 | ;; c) hi # KNOWN INDENT BUG | ||
| 16 | esac | 17 | esac |
| 17 | 18 | ||
| 18 | case $toto in | 19 | case $toto in |
| @@ -34,7 +35,8 @@ foo () { | |||
| 34 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | 35 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
| 35 | ;; | 36 | ;; |
| 36 | esac | | 37 | esac | |
| 37 | cat # KNOWN INDENT BUG | 38 | grep '.' | # KNOWN INDENT BUG |
| 39 | sed 1d | ||
| 38 | 40 | ||
| 39 | case toto in | 41 | case toto in |
| 40 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | 42 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ |