from src.aletk.utils import remove_extra_whitespace


def test_remove_extra_whitespace() -> None:

    # Test normal case
    input_str = "  This  is a   test string. \n With  extra \t whitespace.  "
    expected_output = "This is a test string. With extra whitespace."
    assert remove_extra_whitespace(input_str) == expected_output

    # Test empty string
    input_str = ""
    expected_output = ""
    assert remove_extra_whitespace(input_str) == expected_output

    # Test string with only whitespace
    input_str = "     \n\t   "
    expected_output = ""
    assert remove_extra_whitespace(input_str) == expected_output
