patch 8.2.3136: no test for E187 and "No swap file"

Problem:    No test for E187 and "No swap file".
Solution:   Add a test. (Dominique Pellé, closes #8540)
diff --git a/src/testdir/test_swap.vim b/src/testdir/test_swap.vim
index e62412b..72d204a 100644
--- a/src/testdir/test_swap.vim
+++ b/src/testdir/test_swap.vim
@@ -574,4 +574,8 @@
   augroup! test_swapchoice
 endfunc
 
+func Test_no_swap_file()
+  call assert_equal("\nNo swap file", execute('swapname'))
+endfunc
+
 " vim: shiftwidth=2 sts=2 expandtab