patch 8.1.1285: test17 is old style

Problem:    Test17 is old style.
Solution:   Turn into new style test. (Yegappan Lakshmanan, closes #4347)
diff --git a/src/testdir/test_gf.vim b/src/testdir/test_gf.vim
index d233046..accd21e 100644
--- a/src/testdir/test_gf.vim
+++ b/src/testdir/test_gf.vim
@@ -64,3 +64,38 @@
   bwipe Xfile
   bwipe Xfile2
 endfunc
+
+" Test for invoking 'gf' on a ${VAR} variable
+func Test_gf()
+  if has("ebcdic")
+    set isfname=@,240-249,/,.,-,_,+,,,$,:,~,{,}
+  else
+    set isfname=@,48-57,/,.,-,_,+,,,$,:,~,{,}
+  endif
+
+  call writefile(["Test for gf command"], "Xtest1")
+  if has("unix")
+    call writefile(["    ${CDIR}/Xtest1"], "Xtestgf")
+  else
+    call writefile(["    $TDIR/Xtest1"], "Xtestgf")
+  endif
+  new Xtestgf
+  if has("unix")
+    let $CDIR = "."
+    /CDIR
+  else
+    if has("amiga")
+      let $TDIR = "/testdir"
+    else
+      let $TDIR = "."
+    endif
+    /TDIR
+  endif
+
+  normal gf
+  call assert_equal('Xtest1', fnamemodify(bufname(''), ":t"))
+  close!
+
+  call delete('Xtest1')
+  call delete('Xtestgf')
+endfunc