blob: 132527bd4c29bf9867b4031f27a56eaa78faef15 [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')
10def test_cat(u_boot_console, cat_data):
11 """ Unit test for cat
12
13 Args:
14 u_boot_console -- U-Boot console
15 cat_data -- Path to the disk image used for testing.
16 """
17 response = u_boot_console.run_command_list([
18 f'host bind 0 {cat_data}',
19 'cat host 0 hello'])
20 assert 'hello world' in response