Test commandline function