#!/bin/sh
mkdir -p test-autoload/autoload
cd test-autoload
cat >autoload/test.vim <<EOF
let test#var="abc"
echo "test#var: ".test#var
function test#Test()
    echo test#var
endfunction
EOF
vim -u NONE --cmd 'let &rtp=fnamemodify(".", ":p")' \
               -c 'call test#Test()' \
               -c 'echo "2: test#var: ".test#var' \
               -c 'qa!'
