vim: fix python test
The previous test doesn't really work. Switch to a new test that actually attempts to use vim's python capabilities. Closes #8114. Signed-off-by: Tomasz Pajor <tomek@polishgeeks.com>
This commit is contained in:
parent
d655a33d8f
commit
aec4473ff5
1 changed files with 6 additions and 11 deletions
|
@ -119,18 +119,13 @@ class Vim < Formula
|
||||||
end
|
end
|
||||||
|
|
||||||
test do
|
test do
|
||||||
# Simple test to check if Vim was linked to Python version in $PATH
|
|
||||||
if build.with? "python"
|
if build.with? "python"
|
||||||
vim_path = bin/"vim"
|
(testpath/"commands.vim").write <<-EOS.undent
|
||||||
|
:python import vim; vim.current.buffer[0] = 'hello world'
|
||||||
# Get linked framework using otool
|
:wq
|
||||||
otool_output = `otool -L #{vim_path} | grep -m 1 Python`.gsub(/\(.*\)/, "").strip.chomp
|
EOS
|
||||||
|
system bin/"vim", "-T", "dumb", "-s", "commands.vim", "test.txt"
|
||||||
# Expand the link and get the python exec path
|
assert_equal (testpath/"test.txt").read, "hello world\n"
|
||||||
vim_framework_path = Pathname.new(otool_output).realpath.dirname.to_s.chomp
|
|
||||||
system_framework_path = `python-config --exec-prefix`.chomp
|
|
||||||
|
|
||||||
assert_equal system_framework_path, vim_framework_path
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue