test/test_pkg_config.rb in pkg-config-1.4.0 vs test/test_pkg_config.rb in pkg-config-1.4.1
- old
+ new
@@ -15,14 +15,14 @@
return if ([major, minor] <=> [current_major, current_minor]) <= 0
omit("Require pkg-config #{pkg_config_version} or later")
end
def test_exist?
- assert(system('pkg-config --exists cairo'))
+ assert(system("pkg-config --exists cairo"))
assert(@cairo.exist?)
- assert(system('pkg-config --exists cairo-png'))
+ assert(system("pkg-config --exists cairo-png"))
assert(@cairo_png.exist?)
end
def test_cflags
assert_pkg_config("cairo", ["--cflags"], @cairo.cflags)
@@ -92,11 +92,11 @@
def test_libs_msvc
@cairo.msvc_syntax = true
result = pkg_config("cairo", "--libs")
msvc_result = result.gsub(/-lcairo\b/, "cairo.lib")
- msvc_result = msvc_result.gsub(/-L/, '/libpath:')
+ msvc_result = msvc_result.gsub(/-L/, "/libpath:")
assert_not_equal(msvc_result, result)
assert_equal(msvc_result, @cairo.libs)
end
def test_libs_only_l
@@ -105,11 +105,11 @@
end
def test_libs_only_l_msvc
@cairo_png.msvc_syntax = true
result = pkg_config("cairo-png", "--libs-only-l")
- msvc_result = result.gsub(/-l(cairo|png[0-9]+|z)\b/, '\1.lib')
+ msvc_result = result.gsub(/-l(cairo|png[0-9]+|z)\b/, "\\1.lib")
assert_not_equal(msvc_result, result)
assert_equal(msvc_result, @cairo_png.libs_only_l)
end
def test_libs_only_L
@@ -118,11 +118,11 @@
end
def test_libs_only_L_msvc
@cairo_png.msvc_syntax = true
result = pkg_config("cairo-png", "--libs-only-L")
- msvc_result = result.gsub(/-L/, '/libpath:')
+ msvc_result = result.gsub(/-L/, "/libpath:")
assert_not_equal(msvc_result, result)
assert_equal(msvc_result, @cairo_png.libs_only_L)
end
def test_requires
@@ -165,10 +165,10 @@
end
private
def pkg_config(package, *args)
args.unshift("--define-variable=libdir=#{@custom_libdir}")
- args = args.collect {|arg| arg.dump}.join(' ')
+ args = args.collect {|arg| arg.dump}.join(" ")
`pkg-config #{args} #{package}`.strip
end
def assert_pkg_config(package, pkg_config_args, actual)
result = pkg_config(package, *pkg_config_args)