blob: c81392fb2f9f689f2c0628c9f9f2be50940f2b6c [file]
############################################################################
# Copyright (C) SchedMD LLC.
############################################################################
import re
import atf
def test_usage():
"""Verify salloc --usage has the correct format"""
output = atf.run_command_output("salloc --usage", fatal=True)
assert (
re.search(
r"Usage: salloc(?:\s+\[{1,2}-{1,2}.*?\](?=\s+\[))+\s+\[command \[args\.\.\.\]\]$",
output,
)
is not None
)