Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/pkg-config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ def split_lib_flags(libs_command_line)
all_flags = {}
flags = []
in_option = false
libs_command_line.gsub(/-([Ll]) /, "\\1").split.each do |arg|
libs_command_line.gsub(/(-[Ll])\s+/, "\\1").split.each do |arg|
if in_option
flags << arg
in_option = false
Expand Down
5 changes: 5 additions & 0 deletions test/test-pkg-config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ def split_lib_flags(libs_command_line)
@glib.__send__(:split_lib_flags, libs_command_line)
end

def test_split_separated_lib_options
assert_equal(["-L/tmp/lib", "-lexample"],
split_lib_flags("-L /tmp/lib -l example"))
end

def test_split_libs
assert_equal([
"-L/usr/local/Cellar/gtk+3/3.24.10/lib",
Expand Down