blob: 883803fece798a213b1288b82b1ee904bb757188 [file] [log] [blame]
Roger Knecht11827c42022-09-03 11:34:53 +00001# SPDX-License-Identifier: GPL-2.0+
2
3""" Unit test for cat command
4"""
5
6import pytest
7
8@pytest.mark.boardspec('sandbox')
9@pytest.mark.buildconfigspec('cmd_cat')
Simon Glassddba5202025-02-09 09:07:14 -070010def test_cat(ubman, cat_data):
Roger Knecht11827c42022-09-03 11:34:53 +000011 """ Unit test for cat
12
13 Args:
Simon Glassddba5202025-02-09 09:07:14 -070014 ubman -- U-Boot console
Roger Knecht11827c42022-09-03 11:34:53 +000015 cat_data -- Path to the disk image used for testing.
16 """
Simon Glassddba5202025-02-09 09:07:14 -070017 response = ubman.run_command_list([
Roger Knecht11827c42022-09-03 11:34:53 +000018 f'host bind 0 {cat_data}',
19 'cat host 0 hello'])
20 assert 'hello world' in response