diff --git a/rendercv/cli.py b/rendercv/cli.py index 37db19f2..1ece6336 100644 --- a/rendercv/cli.py +++ b/rendercv/cli.py @@ -842,6 +842,7 @@ def cli_command_new( dm.create_a_sample_yaml_input_file( input_file_path, name=full_name, theme=theme ) + created_files_and_folders.append(input_file_path.name) except ValueError as e: error(e) diff --git a/tests/test_cli.py b/tests/test_cli.py index ca2ee235..329b68b0 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -426,12 +426,16 @@ def test_render_command_with_invalid_arguments( def test_new_command(tmp_path): # change the current working directory to the temporary directory: os.chdir(tmp_path) - runner.invoke(cli.app, ["new", "Jahn Doe"]) + result = runner.invoke(cli.app, ["new", "Jahn Doe"]) markdown_source_files_path = tmp_path / "markdown" theme_source_files_path = tmp_path / "classic" input_file_path = tmp_path / "Jahn_Doe_CV.yaml" + assert "Jahn_Doe_CV.yaml" in result.stdout + assert "markdown" in result.stdout + assert "classic" in result.stdout + assert markdown_source_files_path.exists() assert theme_source_files_path.exists() assert input_file_path.exists()