Commits

ZyX_I committed d9d17fb

Fixed some gentests scripts (they were modifying read-only variables)

Comments (0)

Files changed (2)

test/gentests-expand-tmpdir.zsh

 #!/bin/zsh
-[[ ${TESTTYPE[-4,-1]} == wine ]] && export TMPDIR='T:'
-perl -p -i -e 's/%TMPDIR%/$ENV{"TMPDIR"}/g' *.ok
-
+() {
+    emulate -L zsh
+    [[ ${TESTTYPE[-4,-1]} == wine ]] && local -x TMPDIR='T:'
+    perl -p -i -e 's/%TMPDIR%/$ENV{"TMPDIR"}/g' *.ok
+}

test/gentests-strange-filenames.zsh

 #!/bin/zsh
-emulate -LR zsh
-setopt bsdecho
-typeset -a chars
-typeset -A charnames
-if [[ ${TESTTYPE[-4,-1]} == wine ]] ; then
-    set -A chars $' '
-    typeset -gr TESTDIR='T:\test'
-else
-    set -A chars $' ' $'\n'
-    charnames[${chars[2]}]=newline
-    typeset -gr TESTDIR="${PWD:A}"
-fi
-charnames[${chars[1]}]=space
-nl=$'\n'
-: ${TESTRTP:=${PWD:A}}
-for char in $chars ; do
-    rtp="${TESTDIR}/rtp$char"
-    rtp="${${(qqq)rtp}//$nl/\\n}"
-    realrtp="${PWD:A}/rtp$char"
-    mkdir -p "$realrtp/plugin"
-    cp rtp/plugin/register-return-value.vim "$realrtp/plugin"
-    echo > register-return-value-with-${charnames[$char]}.in "\
+() {
+    emulate -L zsh
+    setopt bsdecho
+    typeset -a chars
+    typeset -A charnames
+    if [[ ${TESTTYPE[-4,-1]} == wine ]] ; then
+        set -A chars $' '
+        local -xr TESTDIR='T:\test'
+    else
+        set -A chars $' ' $'\n'
+        charnames[${chars[2]}]=newline
+        local -xr TESTDIR="${PWD:A}"
+    fi
+    charnames[${chars[1]}]=space
+    nl=$'\n'
+    : ${TESTRTP:=${PWD:A}}
+    for char in $chars ; do
+        rtp="${TESTDIR}/rtp$char"
+        rtp="${${(qqq)rtp}//$nl/\\n}"
+        realrtp="${PWD:A}/rtp$char"
+        mkdir -p "$realrtp/plugin"
+        cp rtp/plugin/register-return-value.vim "$realrtp/plugin"
+        echo > register-return-value-with-${charnames[$char]}.in "\
 :let g:testfile='plugin/register-return-value.vim'
 :let &rtp.=','.$rtp
 :source test.vim"
 :let g:testfile=\"plugin/register-return-value${char//$nl/\\n}.vim\"
 :let &rtp.=','.$rtp
 :source test.vim"
-done
-
+    done
+}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.