Update test to expect a trailing newline in ctf flag -p output

This commit is contained in:
venus
2026-07-18 02:40:26 -05:00
parent 4dc0a24152
commit 05144a2dda

View File

@@ -110,13 +110,14 @@ def test_flag_cmd_cli():
assert result_std.exit_code == 0
assert "Last detected flag: flag{test_cli_flag}" in result_std.output
# Test plain flag command output (no flavor text, no newline)
# Test plain flag command output (no flavor text, has newline)
result_plain = runner.invoke(cli, ["flag", "--plain"])
assert result_plain.exit_code == 0
assert result_plain.output == "flag{test_cli_flag}"
assert result_plain.output.strip() == "flag{test_cli_flag}"
finally:
write_config(original_config, str(config_file))
def test_flag_cmd_exemption(capsys):
"""
Verifies that running ctf flag is exempted from triggering the stdout flag warning box.