patch 8.2.1432: various inconsistencies in test files

Problem:    Various inconsistencies in test files.
Solution:   Add modelines where they were missing.  Use Check commands instead
            of silently skipping over tests.  Adjust indents and comments.
            (Ken Takata, closes #6695)
diff --git a/src/testdir/test_stat.vim b/src/testdir/test_stat.vim
index ccd5950..5cd82b8 100644
--- a/src/testdir/test_stat.vim
+++ b/src/testdir/test_stat.vim
@@ -1,5 +1,7 @@
 " Tests for stat functions and checktime
 
+source check.vim
+
 func CheckFileTime(doSleep)
   let fnames = ['Xtest1.tmp', 'Xtest2.tmp', 'Xtest3.tmp']
   let times = []
@@ -177,12 +179,15 @@
 func Test_win32_symlink_dir()
   " On Windows, non-admin users cannot create symlinks.
   " So we use an existing symlink for this test.
-  if has('win32')
-    " Check if 'C:\Users\All Users' is a symlink to a directory.
-    let res = system('dir C:\Users /a')
-    if match(res, '\C<SYMLINKD> *All Users') >= 0
-      " Get the filetype of the symlink.
-      call assert_equal('dir', getftype('C:\Users\All Users'))
-    endif
+  CheckMSWindows
+  " Check if 'C:\Users\All Users' is a symlink to a directory.
+  let res = system('dir C:\Users /a')
+  if match(res, '\C<SYMLINKD> *All Users') >= 0
+    " Get the filetype of the symlink.
+    call assert_equal('dir', getftype('C:\Users\All Users'))
+  else
+    throw 'Skipped: cannot find an existing symlink'
   endif
 endfunc
+
+" vim: shiftwidth=2 sts=2 expandtab