Commits

ZyX_I committed 0d10751

Replaced some substrings with %TMPDIR% in *.ok files

Comments (0)

Files changed (25)

test/anonymous-return-value.ok

-id: '/home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/rtp/plugin/anonymous-return-value.vim'
+id: '%TMPDIR%/test/rtp/plugin/anonymous-return-value.vim'
 runtimepath: ''
 type: '/anonymous'

test/augroup-twoload.ok

-entered /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/abc
-wiped /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/abc
-wiped /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/def
-entered /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/abc
-wiped /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/abc
-wiped /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/def
+entered %TMPDIR%/test/abc
+wiped %TMPDIR%/test/abc
+wiped %TMPDIR%/test/def
+entered %TMPDIR%/test/abc
+wiped %TMPDIR%/test/abc
+wiped %TMPDIR%/test/def
 entered 
 2: 
 empty: 
-testenter: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/abc
-entered /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/abc
-2: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/abc
-non-empty: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/abc
-: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/abc
-1 2: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/abc
-: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/abc
-1 2: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/abc
-: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/abc
-testenter: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/def
-entered /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/def
-2: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/def
-non-empty: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/def
-testenter: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/ghi
-entered /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/ghi
-2: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/ghi
-non-empty: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/ghi
+testenter: %TMPDIR%/test/abc
+entered %TMPDIR%/test/abc
+2: %TMPDIR%/test/abc
+non-empty: %TMPDIR%/test/abc
+: %TMPDIR%/test/abc
+1 2: %TMPDIR%/test/abc
+: %TMPDIR%/test/abc
+1 2: %TMPDIR%/test/abc
+: %TMPDIR%/test/abc
+testenter: %TMPDIR%/test/def
+entered %TMPDIR%/test/def
+2: %TMPDIR%/test/def
+non-empty: %TMPDIR%/test/def
+testenter: %TMPDIR%/test/ghi
+entered %TMPDIR%/test/ghi
+2: %TMPDIR%/test/ghi
+non-empty: %TMPDIR%/test/ghi
 ===
 testenter: 
 entered 
 2: 
 empty: 
-testenter: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/abc
-entered /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/abc
-2: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/abc
-non-empty: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/abc
-: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/abc
-1 2: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/abc
-: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/abc
-1 2: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/abc
-: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/abc
-testenter: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/def
-entered /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/def
-2: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/def
-non-empty: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/def
-testenter: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/ghi
-entered /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/ghi
-2: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/ghi
-non-empty: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/ghi
+testenter: %TMPDIR%/test/abc
+entered %TMPDIR%/test/abc
+2: %TMPDIR%/test/abc
+non-empty: %TMPDIR%/test/abc
+: %TMPDIR%/test/abc
+1 2: %TMPDIR%/test/abc
+: %TMPDIR%/test/abc
+1 2: %TMPDIR%/test/abc
+: %TMPDIR%/test/abc
+testenter: %TMPDIR%/test/def
+entered %TMPDIR%/test/def
+2: %TMPDIR%/test/def
+non-empty: %TMPDIR%/test/def
+testenter: %TMPDIR%/test/ghi
+entered %TMPDIR%/test/ghi
+2: %TMPDIR%/test/ghi
+non-empty: %TMPDIR%/test/ghi

test/gentests-expand-tmpdir.zsh

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

test/gwine/anonymous-return-value.ok

-id: 'T:\\test\rtp\plugin\anonymous-return-value.vim'
+id: '%TMPDIR%\\test\rtp\plugin\anonymous-return-value.vim'
 runtimepath: ''
 type: '/anonymous'

test/gwine/augroup-twoload.ok

-entered T:/test/abc
-wiped T:/test/abc
-wiped T:/test/def
-entered T:/test/abc
-wiped T:/test/abc
-wiped T:/test/def
+entered %TMPDIR%/test/abc
+wiped %TMPDIR%/test/abc
+wiped %TMPDIR%/test/def
+entered %TMPDIR%/test/abc
+wiped %TMPDIR%/test/abc
+wiped %TMPDIR%/test/def

test/gwine/augroup.ok

 entered 
 2: 
 empty: 
-testenter: T:/test/abc
-entered T:/test/abc
-2: T:/test/abc
-non-empty: T:/test/abc
-: T:/test/abc
-1 2: T:/test/abc
-: T:/test/abc
-1 2: T:/test/abc
-: T:/test/abc
-testenter: T:/test/def
-entered T:/test/def
-2: T:/test/def
-non-empty: T:/test/def
-testenter: T:/test/ghi
-entered T:/test/ghi
-2: T:/test/ghi
-non-empty: T:/test/ghi
+testenter: %TMPDIR%/test/abc
+entered %TMPDIR%/test/abc
+2: %TMPDIR%/test/abc
+non-empty: %TMPDIR%/test/abc
+: %TMPDIR%/test/abc
+1 2: %TMPDIR%/test/abc
+: %TMPDIR%/test/abc
+1 2: %TMPDIR%/test/abc
+: %TMPDIR%/test/abc
+testenter: %TMPDIR%/test/def
+entered %TMPDIR%/test/def
+2: %TMPDIR%/test/def
+non-empty: %TMPDIR%/test/def
+testenter: %TMPDIR%/test/ghi
+entered %TMPDIR%/test/ghi
+2: %TMPDIR%/test/ghi
+non-empty: %TMPDIR%/test/ghi
 ===
 testenter: 
 entered 
 2: 
 empty: 
-testenter: T:/test/abc
-entered T:/test/abc
-2: T:/test/abc
-non-empty: T:/test/abc
-: T:/test/abc
-1 2: T:/test/abc
-: T:/test/abc
-1 2: T:/test/abc
-: T:/test/abc
-testenter: T:/test/def
-entered T:/test/def
-2: T:/test/def
-non-empty: T:/test/def
-testenter: T:/test/ghi
-entered T:/test/ghi
-2: T:/test/ghi
-non-empty: T:/test/ghi
+testenter: %TMPDIR%/test/abc
+entered %TMPDIR%/test/abc
+2: %TMPDIR%/test/abc
+non-empty: %TMPDIR%/test/abc
+: %TMPDIR%/test/abc
+1 2: %TMPDIR%/test/abc
+: %TMPDIR%/test/abc
+1 2: %TMPDIR%/test/abc
+: %TMPDIR%/test/abc
+testenter: %TMPDIR%/test/def
+entered %TMPDIR%/test/def
+2: %TMPDIR%/test/def
+non-empty: %TMPDIR%/test/def
+testenter: %TMPDIR%/test/ghi
+entered %TMPDIR%/test/ghi
+2: %TMPDIR%/test/ghi
+non-empty: %TMPDIR%/test/ghi
 OS: nt (win32)
 Path separator: \
 Line separator: \x0d\x0a
-Curdir: T:\test
-Curdir: T:\test\directory
-Curdir: T:\test
-Curdir: T:\test\directory
+Curdir: %TMPDIR%\test
+Curdir: %TMPDIR%\test\directory
+Curdir: %TMPDIR%\test
+Curdir: %TMPDIR%\test\directory
 0=2: 1
 1=3: 1
 Basename of a/b: b
 ['.\a\b2\c2', ['d2'], []]
 ['.\a\b2\c2\d2', [], []]
 : path.walk
-Walkning through T:\test\directory
-Walkning through T:\test\directory\a
-Walkning through T:\test\directory\a\b
-Walkning through T:\test\directory\a\b\c
-Walkning through T:\test\directory\a\b2
-['T:\test\directory', ['a']]
-['T:\test\directory\a', ['1', 'b', 'b2']]
-['T:\test\directory\a\b', ['c']]
-['T:\test\directory\a\b\c', ['3']]
-['T:\test\directory\a\b2', ['c2']]
+Walkning through %TMPDIR%\test\directory
+Walkning through %TMPDIR%\test\directory\a
+Walkning through %TMPDIR%\test\directory\a\b
+Walkning through %TMPDIR%\test\directory\a\b\c
+Walkning through %TMPDIR%\test\directory\a\b2
+['%TMPDIR%\test\directory', ['a']]
+['%TMPDIR%\test\directory\a', ['1', 'b', 'b2']]
+['%TMPDIR%\test\directory\a\b', ['c']]
+['%TMPDIR%\test\directory\a\b\c', ['3']]
+['%TMPDIR%\test\directory\a\b2', ['c2']]
 a: 1 1
 a/1: 0 1
 : removetree

test/gwine/plugin-with-dependencies.ok

 id: 'plugin/register-return-value'
-runtimepath: 'T:\test\rtp'
+runtimepath: '%TMPDIR%\test\rtp'
 type: 'plugin'
 id: 'plugin/plugin-with-dependencies'
-runtimepath: 'T:\test\rtp'
+runtimepath: '%TMPDIR%\test\rtp'
 type: 'plugin'

test/gwine/recursive-dependent.ok

 id: 'plugin/register-return-value'
-runtimepath: 'T:\test\rtp'
+runtimepath: '%TMPDIR%\test\rtp'
 type: 'plugin'
 id: 'plugin/plugin-with-dependencies'
-runtimepath: 'T:\test\rtp'
+runtimepath: '%TMPDIR%\test\rtp'
 type: 'plugin'
 id: 'plugin/recursive-dependent.2'
-runtimepath: 'T:\test\rtp'
+runtimepath: '%TMPDIR%\test\rtp'
 type: 'plugin'
 id: 'plugin/recursive-dependent'
-runtimepath: 'T:\test\rtp'
+runtimepath: '%TMPDIR%\test\rtp'
 type: 'plugin'
 >>> messages
 plugin/frawor:recdep

test/gwine/register-return-value-with-space-in-scriptname.ok

 id: 'plugin/register-return-value '
-runtimepath: 'T:\test\rtp '
+runtimepath: '%TMPDIR%\test\rtp '
 type: 'plugin'

test/gwine/register-return-value-with-space.ok

 id: 'plugin/register-return-value'
-runtimepath: 'T:\test\rtp '
+runtimepath: '%TMPDIR%\test\rtp '
 type: 'plugin'

test/gwine/register-return-value.ok

 id: 'plugin/register-return-value'
-runtimepath: 'T:\test\rtp'
+runtimepath: '%TMPDIR%\test\rtp'
 type: 'plugin'

test/gwine/valid-double-registration.ok

 id: 'plugin/register-return-value'
-runtimepath: 'T:\test\rtp'
+runtimepath: '%TMPDIR%\test\rtp'
 type: 'plugin'
 id: 'plugin/register-return-value/'
-runtimepath: 'T:\test\rtp '
+runtimepath: '%TMPDIR%\test\rtp '
 type: 'plugin'
 id: 'plugin/register-return-value//'
-runtimepath: 'T:\test\rtpb'
+runtimepath: '%TMPDIR%\test\rtpb'
 type: 'plugin'
 >>> plugin/register-return-value: messages
 plugin/frawor:plregistered
 OS: posix (unix)
 Path separator: /
 Line separator: \x0a
-Curdir: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test
-Curdir: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/directory
-Curdir: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test
-Curdir: /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/directory
+Curdir: %TMPDIR%/test
+Curdir: %TMPDIR%/test/directory
+Curdir: %TMPDIR%/test
+Curdir: %TMPDIR%/test/directory
 0=2: 1
 1=3: 1
 Basename of a/b: b
 ['./a/b2/c2', ['d2'], []]
 ['./a/b2/c2/d2', [], []]
 : path.walk
-Walkning through /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/directory
-Walkning through /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/directory/a
-Walkning through /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/directory/a/b
-Walkning through /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/directory/a/b/c
-Walkning through /home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/directory/a/b2
-['/home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/directory', ['a']]
-['/home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/directory/a', ['1', 'b', 'b2']]
-['/home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/directory/a/b', ['c']]
-['/home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/directory/a/b/c', ['3']]
-['/home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/directory/a/b2', ['c2']]
+Walkning through %TMPDIR%/test/directory
+Walkning through %TMPDIR%/test/directory/a
+Walkning through %TMPDIR%/test/directory/a/b
+Walkning through %TMPDIR%/test/directory/a/b/c
+Walkning through %TMPDIR%/test/directory/a/b2
+['%TMPDIR%/test/directory', ['a']]
+['%TMPDIR%/test/directory/a', ['1', 'b', 'b2']]
+['%TMPDIR%/test/directory/a/b', ['c']]
+['%TMPDIR%/test/directory/a/b/c', ['3']]
+['%TMPDIR%/test/directory/a/b2', ['c2']]
 a: 1 1
 a/1: 0 1
 : removetree

test/plugin-with-dependencies.ok

 id: 'plugin/register-return-value'
-runtimepath: '/home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/rtp'
+runtimepath: '%TMPDIR%/test/rtp'
 type: 'plugin'
 id: 'plugin/plugin-with-dependencies'
-runtimepath: '/home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/rtp'
+runtimepath: '%TMPDIR%/test/rtp'
 type: 'plugin'

test/recursive-dependent.ok

 id: 'plugin/register-return-value'
-runtimepath: '/home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/rtp'
+runtimepath: '%TMPDIR%/test/rtp'
 type: 'plugin'
 id: 'plugin/plugin-with-dependencies'
-runtimepath: '/home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/rtp'
+runtimepath: '%TMPDIR%/test/rtp'
 type: 'plugin'
 id: 'plugin/recursive-dependent.2'
-runtimepath: '/home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/rtp'
+runtimepath: '%TMPDIR%/test/rtp'
 type: 'plugin'
 id: 'plugin/recursive-dependent'
-runtimepath: '/home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/rtp'
+runtimepath: '%TMPDIR%/test/rtp'
 type: 'plugin'
 >>> messages
 plugin/frawor:recdep

test/register-return-value-not-in-rtp.ok

-id: '/home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/rtp/plugin/register-return-value'
+id: '%TMPDIR%/test/rtp/plugin/register-return-value'
 runtimepath: ''
 type: '/unknown'

test/register-return-value-with-newline-in-scriptname.ok

Binary file modified.

test/register-return-value-with-newline.ok

Binary file modified.

test/register-return-value-with-space-in-scriptname.ok

 id: 'plugin/register-return-value '
-runtimepath: '/home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/rtp '
+runtimepath: '%TMPDIR%/test/rtp '
 type: 'plugin'

test/register-return-value-with-space.ok

 id: 'plugin/register-return-value'
-runtimepath: '/home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/rtp '
+runtimepath: '%TMPDIR%/test/rtp '
 type: 'plugin'

test/register-return-value.ok

 id: 'plugin/register-return-value'
-runtimepath: '/home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/rtp'
+runtimepath: '%TMPDIR%/test/rtp'
 type: 'plugin'

test/updateouts.zsh

 
 autoload colors && colors
 
-typeset -gr TEMPDIR=$0:a:h:h:h/repository/tmp
+typeset -xr TMPDIR=$0:A:h:h:h/repository/tmp
 typeset -gr PREFIX=${PREFIX:-.}
 
+function copyout()
+{
+    othername=$TMPDIR/test/$1
+    cp $othername.out $PREFIX/$1.ok
+    [[ ${PREFIX[-4,-1]} == wine ]] && local -x TMPDIR='T:'
+    perl -p -i -e 's/\Q$ENV{"TMPDIR"}\E/%TMPDIR%/g' $PREFIX/$1.ok
+}
+
 cd $0:a:h
 
 test -d $PREFIX || mkdir $PREFIX
 
-if test -e $TEMPDIR/failed.lst ; then
-    cat $TEMPDIR/failed.lst | cut -d' ' -f 2 | \
+if test -e $TMPDIR/failed.lst ; then
+    cat $TMPDIR/failed.lst | cut -d' ' -f 2 | \
         while read l ; do
-            othername=$TEMPDIR/test/$l
+            othername=$TMPDIR/test/$l
             echo
             diff -a -y $othername.ok $othername.out
             echo -n "\n\e[${color[yellow]}mUpdate $l?\e[0m "
             read -q update || continue
-            cp $othername.out $PREFIX/$l.ok
+            copyout $l
         done
 fi
 
-for TEST in $TEMPDIR/test/*.in ; do
+for TEST in $TMPDIR/test/*.in ; do
     TEST=$TEST:t:r
     test -e $TEST.ok && continue
-    othername=$TEMPDIR/test/$TEST
+    othername=$TMPDIR/test/$TEST
     test -e $othername.out || continue
     echo
     cat $othername.out
     echo -n "\n\e[${color[yellow]}mCopy $TEST?\e[0m "
     read -q copy || continue
-    cp $othername.out $PREFIX/$TEST.ok
+    copyout $TEST
 done

test/valid-double-registration.ok

 id: 'plugin/register-return-value'
-runtimepath: '/home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/rtp'
+runtimepath: '%TMPDIR%/test/rtp'
 type: 'plugin'
 id: 'plugin/register-return-value/'
-runtimepath: '/home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/rtp '
+runtimepath: '%TMPDIR%/test/rtp '
 type: 'plugin'
 id: 'plugin/register-return-value//'
-runtimepath: '/home/zyx/a.a/.settings/home/.vim/dev/repository/tmp/test/rtpb'
+runtimepath: '%TMPDIR%/test/rtpb'
 type: 'plugin'
 >>> plugin/register-return-value: messages
 plugin/frawor:plregistered