Commit ce2e74c5 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner

pkg: Preserved parsed space in dep versions

parent 9111de81
...@@ -253,7 +253,7 @@ function package_postprocess(status) ...@@ -253,7 +253,7 @@ function package_postprocess(status)
local idx = 0 local idx = 0
replace("Depends", ",", function (s) replace("Depends", ",", function (s)
idx = idx + 1 idx = idx + 1
return idx, s:gsub("%s", ""):gsub("%(", " (") return idx, s:gsub("^%s", ""):gsub("%s$", "")
end) end)
idx = 0 idx = 0
replace("Status", " ", function (s) replace("Status", " ", function (s)
......
...@@ -127,7 +127,7 @@ function test_package_postprocces() ...@@ -127,7 +127,7 @@ function test_package_postprocces()
assert_equal(package, output) assert_equal(package, output)
assert_table_equal({"install", "user", "installed"}, output.Status) assert_table_equal({"install", "user", "installed"}, output.Status)
assert_table_equal({["/etc/config/dhcp"] = "f81fe9bd228dede2165be71e5c9dcf76cc", ["/etc/dnsmasq.conf"] = "1e6ab19c1ae5e70d609ac7b6246541d520"}, output.Conffiles) assert_table_equal({["/etc/config/dhcp"] = "f81fe9bd228dede2165be71e5c9dcf76cc", ["/etc/dnsmasq.conf"] = "1e6ab19c1ae5e70d609ac7b6246541d520"}, output.Conffiles)
assert_table_equal({"libc", "kernel (=3.18.21-1-70ea6b9a4b789c558ac9d579b5c1022f-10)", "kmod-nls-base"}, output.Depends) assert_table_equal({"libc", "kernel (= 3.18.21-1-70ea6b9a4b789c558ac9d579b5c1022f-10)", "kmod-nls-base"}, output.Depends)
--[[ --[[
Now check it doesn't get confused when some of the modified fields aren't there Now check it doesn't get confused when some of the modified fields aren't there
(or none, in this case). (or none, in this case).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment