def METHOD_NAME(run_command):
    @click.command()
    @click.option("--bar", type=TaskPath(coerce_to_dir=True))
    def foo(bar):
        click.echo(repr(bar))
    # filename -> append slash
    result = run_command(foo, ["--bar", "/baz.txt"])
    assert (
        "TaskPath(base_dir=None,coerce_to_dir=True,normalize=True,"
        "path=/baz.txt/,orig_path=/baz.txt)\n"
    ) == result.output
    # dirname -> no change
    result = run_command(foo, ["--bar", "baz/"])
    assert (
        "TaskPath(base_dir=None,coerce_to_dir=True,normalize=True,"
        "path=baz/,orig_path=baz/)\n"
    ) == result.output