test/dpkg_test.rb in hysh-0.0.1 vs test/dpkg_test.rb in hysh-0.0.2

- old
+ new

@@ -29,5 +29,21 @@ end Hysh.filter_line &proc_line } } end + +def dpkg_installed3(package_names = nil) + hysh_script { + if package_names + pipe ['dpkg', '-l'] { + filter_line { |l| + package_names.any? { |pkg| + l.index pkg + } && l + } + } + else + dpkg '-l' + end + } +end