patch 8.2.4133: output of ":scriptnames" goes into the message history

Problem:    output of ":scriptnames" goes into the message history, while this
            des not happen for other commands, such as ":ls".
Solution:   Use msg_outtrans() instead of smsg(). (closes #9551)
diff --git a/src/testdir/test_scriptnames.vim b/src/testdir/test_scriptnames.vim
index 4712d00..44ec146 100644
--- a/src/testdir/test_scriptnames.vim
+++ b/src/testdir/test_scriptnames.vim
@@ -23,6 +23,10 @@
 
   bwipe
   call delete('Xscripting')
+
+  let msgs = execute('messages')
+  scriptnames
+  call assert_equal(msgs, execute('messages'))
 endfunc
 
 " vim: shiftwidth=2 sts=2 expandtab