]> gitweb.ps.run Git - ps-cgit/commitdiff
t0111: Additions and fixes
authorLukas Fleischer <cgit@cryptocrack.de>
Wed, 15 Jan 2014 22:11:19 +0000 (23:11 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Wed, 15 Jan 2014 23:53:18 +0000 (00:53 +0100)
* Rename the capitalize-* filters to dump.* since they also dump the
  arguments.

* Add full argument validation to the email filters.

Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
tests/filters/dump.lua [moved from tests/filters/capitalize-buffer.lua with 100% similarity]
tests/filters/dump.sh [moved from tests/filters/capitalize-stdin.sh with 100% similarity]
tests/setup.sh
tests/t0111-filter.sh

index 12c97f55a1c241dcc1ab6154e6e5512543b2abb2..785edd79565d8334ee0490be1b42c59afc0bab6f 100755 (executable)
@@ -128,19 +128,19 @@ repo.desc=spaced repo
 repo.url=filter-exec
 repo.path=$PWD/repos/filter/.git
 repo.desc=filtered repo
-repo.about-filter=exec:$FILTER_DIRECTORY/capitalize-stdin.sh
-repo.commit-filter=exec:$FILTER_DIRECTORY/capitalize-stdin.sh
-repo.email-filter=exec:$FILTER_DIRECTORY/capitalize-stdin.sh
-repo.source-filter=exec:$FILTER_DIRECTORY/capitalize-stdin.sh
+repo.about-filter=exec:$FILTER_DIRECTORY/dump.sh
+repo.commit-filter=exec:$FILTER_DIRECTORY/dump.sh
+repo.email-filter=exec:$FILTER_DIRECTORY/dump.sh
+repo.source-filter=exec:$FILTER_DIRECTORY/dump.sh
 repo.readme=master:a+b
 
 repo.url=filter-lua
 repo.path=$PWD/repos/filter/.git
 repo.desc=filtered repo
-repo.about-filter=lua:$FILTER_DIRECTORY/capitalize-buffer.lua
-repo.commit-filter=lua:$FILTER_DIRECTORY/capitalize-buffer.lua
-repo.email-filter=lua:$FILTER_DIRECTORY/capitalize-buffer.lua
-repo.source-filter=lua:$FILTER_DIRECTORY/capitalize-buffer.lua
+repo.about-filter=lua:$FILTER_DIRECTORY/dump.lua
+repo.commit-filter=lua:$FILTER_DIRECTORY/dump.lua
+repo.email-filter=lua:$FILTER_DIRECTORY/dump.lua
+repo.source-filter=lua:$FILTER_DIRECTORY/dump.lua
 repo.readme=master:a+b
 EOF
 }
index c89020aa1f404d6f7990f12ecaa86e0681cc618d..730f1c02a36b70cc64d63b87426d7ef625730fda 100755 (executable)
@@ -30,11 +30,11 @@ do
        '
 
        test_expect_success "check whether the $prefix email filter works for authors" '
-               grep "A U THOR &LT;AUTHOR@EXAMPLE.COM&GT;" tmp
+               grep "<author@example.com> commit A U THOR &LT;AUTHOR@EXAMPLE.COM&GT;" tmp
        '
 
        test_expect_success "check whether the $prefix email filter works for committers" '
-               grep "C O MITTER &LT;COMMITTER@EXAMPLE.COM&GT;" tmp
+               grep "<committer@example.com> commit C O MITTER &LT;COMMITTER@EXAMPLE.COM&GT;" tmp
        '
 done