Beispiel #1
0
 def test_cmd_info_exclude_0x107_0x401(self):
     stdout = io.StringIO()
     bincopy.main(['info',
                   'tests/files/out.s19',
                   '--exclude', '0x107', '0x401'], stdout)
     stdout.seek(0)
     with open('tests/files/info_exclude_0x107_0x401.txt') as fin:
         self.assertEqual(stdout.read(), fin.read())
Beispiel #2
0
 def test_cmd_info(self):
     stdout = io.StringIO()
     bincopy.main(['info',
                   'tests/files/in.s19',
                   'tests/files/in.hex',
                   '--ihex',
                   'tests/files/binary1.bin',
                   '--binary',
                   '--offset', '1024'], stdout)
     stdout.seek(0)
     with open('tests/files/info.txt') as fin:
         self.assertEqual(stdout.read(), fin.read())
Beispiel #3
0
 def test_cmd_cat(self):
     stdout = io.StringIO()
     bincopy.main(['cat',
                   'tests/files/in.s19',
                   'tests/files/in.hex',
                   '--ihex',
                   'tests/files/binary1.bin',
                   '--binary',
                   '--offset', '1024',
                   '--output',
                   '--address-length', '16'], stdout)
     stdout.seek(0)
     with open('tests/files/out.s19') as fin:
         self.assertEqual(stdout.read(), fin.read())
Beispiel #4
0
 def test_help(self):
     bincopy.main(['--help'])