[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[minion-cvs] Bullet-proof parsecommand test on systems with unlinuxy...



Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria.mit.edu:/tmp/cvs-serv14170/lib/mixminion

Modified Files:
	test.py 
Log Message:
Bullet-proof parsecommand test on systems with unlinuxy paths (/usr/bin/ls before /bin/ls?)

Index: test.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/test.py,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -d -r1.121 -r1.122
--- test.py	13 Jun 2003 01:03:45 -0000	1.121
+++ test.py	21 Jun 2003 07:29:32 -0000	1.122
@@ -3569,8 +3569,13 @@
         # Command
         if not sys.platform == 'win32':
             # WIN32 This should get implemented for Windows.
-            self.assertEquals(C._parseCommand("ls -l"), ("/bin/ls", ['-l']))
+            c = C._parseCommand("ls -l")
+            self.assert_(os.path.exists(c[0]) and c[0].endswith("/ls"))
+            self.assertEquals(c[1], ['-l'])
             self.assertEquals(C._parseCommand("rm"), ("/bin/rm", []))
+            c = C._parseCommand("rm")
+            self.assert_(os.path.exists(c[0]) and c[0].endswith("/rm"))
+            self.assertEquals(c[1], [])
             self.assertEquals(C._parseCommand("/bin/ls"), ("/bin/ls", []))
             self.failUnless(C._parseCommand("python")[0] is not None)