def test_appends(self):
     code = []
     _append_header(code)
     self.assertEqual(['#!/usr/bin/env sh',
                       '# generated from catkin/python/catkin/environment_cache.py', ''], code)
     code = []
     _append_comment(code, 'foo')
     self.assertEqual(['# foo'], code)
     code = []
     _set_variable(code, 'foo', 'bar')
     self.assertEqual(['export foo="bar"'], code)
 def test_appends(self):
     code = []
     _append_header(code)
     self.assertEqual([
         '#!/usr/bin/env sh',
         '# generated from catkin/python/catkin/environment_cache.py', ''
     ], code)
     code = []
     _append_comment(code, 'foo')
     self.assertEqual(['# foo'], code)
     code = []
     _set_variable(code, 'foo', 'bar')
     self.assertEqual(['export foo="bar"'], code)
 def test_appends_windows(self):
     catkin.environment_cache.platform = self.winplatform
     code = []
     _append_header(code)
     self.assertEqual(['@echo off',
                       'REM generated from catkin/python/catkin/environment_cache.py',
                       ''], code)
     code = []
     _append_comment(code, 'foo')
     self.assertEqual(['REM foo'], code)
     code = []
     _set_variable(code, 'foo', 'bar')
     self.assertEqual(['set foo=bar'], code)
 def test_appends_windows(self):
     catkin.environment_cache.platform = self.winplatform
     code = []
     _append_header(code)
     self.assertEqual([
         '@echo off',
         'REM generated from catkin/python/catkin/environment_cache.py', ''
     ], code)
     code = []
     _append_comment(code, 'foo')
     self.assertEqual(['REM foo'], code)
     code = []
     _set_variable(code, 'foo', 'bar')
     self.assertEqual(['set foo=bar'], code)