patch 8.2.1129: Vim9: bar not recognized after not compiled command

Problem:    Vim9: bar not recognized after not compiled command.
Solution:   Check for bar for commands where this is possible. (closes #6391)
diff --git a/src/testdir/test_vim9_cmd.vim b/src/testdir/test_vim9_cmd.vim
index 27d2b3a..53d964f 100644
--- a/src/testdir/test_vim9_cmd.vim
+++ b/src/testdir/test_vim9_cmd.vim
@@ -2,6 +2,7 @@
 
 source check.vim
 source vim9.vim
+source view_util.vim
 
 def Test_edit_wildcards()
   let filename = 'Xtest'
@@ -207,5 +208,38 @@
   CheckScriptSuccess(lines)
 enddef
 
+def Test_bar_after_command()
+  def RedrawAndEcho()
+    let x = 'did redraw'
+    redraw | echo x
+  enddef
+  RedrawAndEcho()
+  assert_match('did redraw', Screenline(&lines))
+
+  if has('unix')
+    # bar in filter write command does not start new command
+    def WriteToShell()
+      new
+      setline(1, 'some text')
+      w !cat | cat > Xoutfile
+      bwipe!
+    enddef
+    WriteToShell()
+    assert_equal(['some text'], readfile('Xoutfile'))
+    delete('Xoutfile')
+
+    # bar in filter read command does not start new command
+    def ReadFromShell()
+      new
+      r! echo hello there | cat > Xoutfile
+      r !echo again | cat >> Xoutfile
+      bwipe!
+    enddef
+    ReadFromShell()
+    assert_equal(['hello there', 'again'], readfile('Xoutfile'))
+    delete('Xoutfile')
+  endif
+enddef
+
 
 " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker