diff options
Diffstat (limited to 'tools/binman/ftest.py')
-rw-r--r-- | tools/binman/ftest.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index c54cd12e71..696889601e 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -41,6 +41,9 @@ FSP_DATA = 'fsp' CMC_DATA = 'cmc' VBT_DATA = 'vbt' MRC_DATA = 'mrc' +TEXT_DATA = 'text' +TEXT_DATA2 = 'text2' +TEXT_DATA3 = 'text3' class TestFunctional(unittest.TestCase): """Functional tests for binman @@ -1161,6 +1164,19 @@ class TestFunctional(unittest.TestCase): self.assertIn('GetArg() internal error: Unknown data type ', str(e.exception)) + def testText(self): + """Test for a text entry type""" + entry_args = { + 'test-id': TEXT_DATA, + 'test-id2': TEXT_DATA2, + 'test-id3': TEXT_DATA3, + } + data, _, _, _ = self._DoReadFileDtb('66_text.dts', + entry_args=entry_args) + expected = (TEXT_DATA + chr(0) * (8 - len(TEXT_DATA)) + TEXT_DATA2 + + TEXT_DATA3 + 'some text') + self.assertEqual(expected, data) + if __name__ == "__main__": unittest.main() |