fp_out = NULL;
# ifdef EEXIST
/* Avoid trying lots of names while the problem is lack
- * of premission, only retry if the file already
+ * of permission, only retry if the file already
* exists. */
if (errno != EEXIST)
break;
}
subflags.do_error = TRUE;
subflags.do_print = FALSE;
+ subflags.do_list = FALSE;
subflags.do_count = FALSE;
subflags.do_number = FALSE;
subflags.do_ic = 0;
endfor
endfunc
+" Test the l, p, # flags.
+func Test_substitute_flags_lp()
+ new
+ call setline(1, "abc\tdef\<C-h>ghi")
+
+ let a = execute('s/a/a/p')
+ call assert_equal("\nabc def^Hghi", a)
+
+ let a = execute('s/a/a/l')
+ call assert_equal("\nabc^Idef^Hghi$", a)
+
+ let a = execute('s/a/a/#')
+ call assert_equal("\n 1 abc def^Hghi", a)
+
+ let a = execute('s/a/a/p#')
+ call assert_equal("\n 1 abc def^Hghi", a)
+
+ let a = execute('s/a/a/l#')
+ call assert_equal("\n 1 abc^Idef^Hghi$", a)
+
+ let a = execute('s/a/a/')
+ call assert_equal("", a)
+
+ bwipe!
+endfunc
+
func Test_substitute_repeat()
" This caused an invalid memory access.
split Xfile