Use bash's built-in echo instead of the actual echo binary since it has
authorZac Medico <zmedico@gentoo.org>
Sat, 21 Jun 2008 09:26:53 +0000 (09:26 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 21 Jun 2008 09:26:53 +0000 (09:26 -0000)
compatibility issues on FreeBSD systems. Thanks to aballier for reporting
the issue and testing this patch.

svn path=/main/trunk/; revision=10751

pym/portage/tests/sets/shell/testShell.py

index b1f4aa46c6c9aa8370e006d9326bca286063e5c5..43d69599a13a3b387319d5c007214cba839cc3c2 100644 (file)
@@ -19,10 +19,11 @@ class CommandOutputSetTestCase(TestCase):
        def testCommand(self):
                
                input = set(test_cps)
-               command = find_binary("echo")
-               command += " -"
+               command = find_binary("bash")
+               command += " -c '"
                for a in input:
-                 command += "\"%s\n\"" % a
+                 command += " echo -e \"%s\" ; " % a
+               command += "'"
                s = CommandOutputSet(command)
                atoms = s.getAtoms()
                self.assertEqual(atoms, input)