@@ -29,19 +29,8 @@ def test_simple(example_runner: CliRunner) -> None:
2929 assert result .exit_code == 0 , result .output
3030
3131 # Run the CMake configuration command
32- cmake_result = subprocess .run (['cmake' , '--preset=default' ], capture_output = True , text = True , check = False )
32+ cmake_result = subprocess .run (
33+ ['cmake' , '--preset=default' , '-B' , 'build' ], capture_output = True , text = True , check = False
34+ )
3335
3436 assert cmake_result .returncode == 0 , f'CMake configuration failed: { cmake_result .stderr } '
35-
36- # Run the CMake build command
37- build_result = subprocess .run (['cmake' , '--build' , 'build' ], capture_output = True , text = True , check = False )
38-
39- assert build_result .returncode == 0 , f'CMake build failed: { build_result .stderr } '
40- assert 'Build finished successfully' in build_result .stdout , 'CMake build did not finish successfully'
41-
42- # Execute the built program and verify the output
43- program_result = subprocess .run (['build/HelloWorld' ], capture_output = True , text = True , check = False )
44-
45- assert program_result .returncode == 0 , f'Program execution failed: { program_result .stderr } '
46-
47- assert 'Hello, World!' in program_result .stdout , 'Program output did not match expected output'
0 commit comments