Allow autocomplete for test file in autotest.sh

new PR for #12718