18902 pkg list version column should be longer to accommodate new versions
authorShawn Walker <shawn.walker@oracle.com>
Thu, 08 Sep 2011 11:55:42 -0700
changeset 2544 507e17350a73
parent 2543 852126070586
child 2545 cf05d5f0fe9f
18902 pkg list version column should be longer to accommodate new versions
src/client.py
src/tests/cli/t_pkg_freeze.py
--- a/src/client.py	Thu Sep 08 08:35:44 2011 +0100
+++ b/src/client.py	Thu Sep 08 11:55:42 2011 -0700
@@ -423,7 +423,7 @@
         elif summary:
                 fmt_str = "%-55s %s"
         else:
-                fmt_str = "%-55s %-20s %s"
+                fmt_str = "%-49s %-26s %s"
 
         # Each pattern in pats can be a partial or full FMRI, so
         # extract the individual components.  These patterns are
--- a/src/tests/cli/t_pkg_freeze.py	Thu Sep 08 08:35:44 2011 +0100
+++ b/src/tests/cli/t_pkg_freeze.py	Thu Sep 08 11:55:42 2011 -0700
@@ -269,11 +269,11 @@
                 # Check that the output of pkg list is correct in terms of the F
                 # column.
                 self.pkg("list -Ha %s" % new_foo)
-                expected = "%-55s %-20s %s\n" % ("foo", "1.0-0", "---")
-                self.assertEqualDiff(expected, self.output)
+                expected = "foo 1.0-0 ---\n"
+                self.assertEqualDiff(expected, self.reduceSpaces(self.output))
                 self.pkg("list -Ha %s" % existing_foo)
-                expected = "%-55s %-20s %s\n" % ("foo", "1.0-0", "-f-")
-                self.assertEqualDiff(expected, self.output)
+                expected = "foo 1.0-0 -f-\n"
+                self.assertEqualDiff(expected, self.reduceSpaces(self.output))
                 # This should install the original [email protected] package.
                 self._api_install(self.api_obj, ["foo"])
                 # Relax the freeze so it doesn't include the timestamp.
@@ -283,11 +283,11 @@
 
                 # Test that pkg list reflects the relaxed freeze.
                 self.pkg("list -H %s" % existing_foo)
-                expected = "%-55s %-20s %s\n" % ("foo", "1.0-0", "if-")
-                self.assertEqualDiff(expected, self.output)
+                expected = "foo 1.0-0 if-\n"
+                self.assertEqualDiff(expected, self.reduceSpaces(self.output))
                 self.pkg("list -Haf %s" % new_foo)
-                expected = "%-55s %-20s %s\n" % ("foo", "1.0-0", "-f-")
-                self.assertEqualDiff(expected, self.output)
+                expected = "foo 1.0-0 -f-\n"
+                self.assertEqualDiff(expected, self.reduceSpaces(self.output))
                 # This should work and take foo to the [email protected] with the newer
                 # timestamp.
                 self.pkg("update %s" % new_foo)