Esempio n. 1
0
 def testAppend(self):
     cmdLine, env = clcache.extendCommandLineFromEnvironment(['/nologo'], {
         'USER': '******',
         '_CL_': 'file.c',
     })
     self.assertEqual(cmdLine, ['/nologo', 'file.c'])
     self.assertEqual(env, {'USER': '******'})
Esempio n. 2
0
 def testPrepend(self):
     cmdLine, env = clcache.extendCommandLineFromEnvironment(['/nologo'], {
         'USER': '******',
         'CL': '/MP',
     })
     self.assertEqual(cmdLine, ['/MP', '/nologo'])
     self.assertEqual(env, {'USER': '******'})
Esempio n. 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'])
Esempio n. 4
0
 def testSimple(self):
     cmdLine, env = clcache.extendCommandLineFromEnvironment(['/nologo'], {'USER': '******'})
     self.assertEqual(cmdLine, ['/nologo'])
     self.assertEqual(env, {'USER': '******'})
Esempio n. 5
0
 def testEmpty(self):
     cmdLine, env = clcache.extendCommandLineFromEnvironment([], {})
     self.assertEqual(cmdLine, [])
     self.assertEqual(env, {})