Beispiel #1
0
 def testAppend(self):
     cmdLine, env = clcache.extendCommandLineFromEnvironment(['/nologo'], {
         'USER': '******',
         '_CL_': 'file.c',
     })
     self.assertEqual(cmdLine, ['/nologo', 'file.c'])
     self.assertEqual(env, {'USER': '******'})
Beispiel #2
0
 def testPrepend(self):
     cmdLine, env = clcache.extendCommandLineFromEnvironment(['/nologo'], {
         'USER': '******',
         'CL': '/MP',
     })
     self.assertEqual(cmdLine, ['/MP', '/nologo'])
     self.assertEqual(env, {'USER': '******'})
Beispiel #3
0
 def testPrependMultiple(self):
     cmdLine, _ = clcache.extendCommandLineFromEnvironment(['INPUT.C'], {
         'CL': r'/Zp2 /Ox /I\INCLUDE\MYINCLS \LIB\BINMODE.OBJ',
     })
     self.assertEqual(cmdLine, ['/Zp2', '/Ox', r'/I\INCLUDE\MYINCLS', r'\LIB\BINMODE.OBJ', 'INPUT.C'])
Beispiel #4
0
 def testSimple(self):
     cmdLine, env = clcache.extendCommandLineFromEnvironment(['/nologo'], {'USER': '******'})
     self.assertEqual(cmdLine, ['/nologo'])
     self.assertEqual(env, {'USER': '******'})
Beispiel #5
0
 def testEmpty(self):
     cmdLine, env = clcache.extendCommandLineFromEnvironment([], {})
     self.assertEqual(cmdLine, [])
     self.assertEqual(env, {})