add tests for APPEND-EXTENSION-IF-NECESSARY function