diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Align with spaces instead of tabs
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/extensions/lib.sh | 12 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| -rwxr-xr-x | tests/t0001-git-version.sh | 8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 files changed, 10 insertions, 10 deletions
diff --git a/tests/extensions/lib.sh b/tests/extensions/lib.sh index ec1ef85..30a9cc8 100644 --- a/tests/extensions/lib.sh +++ b/tests/extensions/lib.sh @@ -45,15 +45,15 @@ cgit_lua_probe() { echo "function filter_open(...) end" echo "function filter_write(str) end" echo "function filter_close()" - echo " local ok = true" + echo "local ok = true" for cgit_lua_probe_module in "$@" do - echo " if not pcall(require, '$cgit_lua_probe_module') then" - echo " ok = false" - echo " end" + echo "if not pcall(require, '$cgit_lua_probe_module') then" + echo "ok = false" + echo "end" done - echo " if ok then html('LUA_PROBE_YES') else html('LUA_PROBE_NO') end" - echo " return 0" + echo "if ok then html('LUA_PROBE_YES') else html('LUA_PROBE_NO') end" + echo "return 0" echo "end" } >lua-probe.lua cat >lua-probe-cgitrc <<EOF diff --git a/tests/t0001-git-version.sh b/tests/t0001-git-version.sh index dd49002..76b24db 100755 --- a/tests/t0001-git-version.sh +++ b/tests/t0001-git-version.sh @@ -15,8 +15,8 @@ CGIT_TEST_NO_CREATE_REPOS=YesPlease . ./setup.sh test_expect_success 'extract Git version from Makefile' ' - sed -n -e "/^GIT_VERSION[ ]*=/ { - s/^GIT_VERSION[ ]*=[ ]*// + sed -n -e "/^GIT_VERSION[[:space:]]*=/ { + s/^GIT_VERSION[[:space:]]*=[[:space:]]*// p }" "$TEST_OUTPUT_DIRECTORY/../Makefile" >makefile_version ' @@ -27,7 +27,7 @@ test_expect_success 'extract Git version from Makefile' ' test_expect_success 'test Git version matches Makefile' ' ( cat "$TEST_OUTPUT_DIRECTORY/../vendor/git/GIT-VERSION-FILE" || echo "No GIT-VERSION-FILE" ) | - sed -e "s/GIT_VERSION[ ]*=[ ]*//" -e "s/\\.dirty$//" >git_version && + sed -e "s/GIT_VERSION[[:space:]]*=[[:space:]]*//" -e "s/\\.dirty$//" >git_version && sed -e "s/-/./g" makefile_version >makefile_git_version && test_cmp git_version makefile_git_version ' @@ -42,7 +42,7 @@ test_expect_success 'test submodule version matches Makefile' ' ( cd "$TEST_OUTPUT_DIRECTORY/.." && submodule_oid=$(git ls-files --stage -- vendor/git | - sed -e "s/^[0-9]* \\([0-9a-f]*\\) [0-9] .*$/\\1/") && + sed -e "s/^[0-9]* \\([0-9a-f]*\\) [0-9][[:space:]].*$/\\1/") && cd vendor/git && git describe --match "v[0-9]*" $submodule_oid ) | sed -e "s/^v//" -e "s/-/./" >submodule_version && |
