Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Actually do test what I claimed to test



On Nov 27,  5:09pm, Jun T. wrote:
}
} It still fails on Mac OS X and freebsd (maybe also on other BSD's).
} sed on these OS's strips the leading white spaces before the 'text'
[...]
} Is there any way to properly quote the \ (at the beginning of line) in ztst
} file? If not, using awk may be a possible alternative.

The number of leading spaces doesn't matter, so just don't put the
backslash at the beginning of the line, put a space on each side of it:

diff --git a/Test/V10private.ztst b/Test/V10private.ztst
index bb456f2..cb2075c 100644
--- a/Test/V10private.ztst
+++ b/Test/V10private.ztst
@@ -8,8 +8,8 @@
 
  # Do not use .tmp here, ztst.zsh will remove it too soon (see %cleanup)
  mkdir private.TMP
- sed '/^%prep/a\
-  zmodload zsh/param/private' < $ZTST_srcdir/B02typeset.ztst > private.TMP/B02
+ sed -e '/^%prep/a\
+ \ zmodload zsh/param/private' < $ZTST_srcdir/B02typeset.ztst > private.TMP/B02
 
 %test


Does that cover it?



Messages sorted by: Reverse Date, Date, Thread, Author