zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: PATCH: Assorted minor test tweaks
Date: Wed, 22 Aug 2001 15:46:55 +0000	[thread overview]
Message-ID: <1010822154655.ZM23919@candle.brasslantern.com> (raw)

I've had these sitting around and wanted to get them committed.  Mostly
they're whitespace changes in the %prep sections to get the test to exit
sooner if something goes horribly wrong.  However, there's also a work-
around for the "root can read anything" test failure in CO2cond, and a
test for `typeset -ft'.

--- ../zsh-forge/current/Test/A01grammar.ztst	Mon Jul  9 12:10:50 2001
+++ ./Test/A01grammar.ztst	Sun Aug 12 12:28:03 2001
@@ -5,6 +5,7 @@
 %prep
 
   mkdir basic.tmp && cd basic.tmp
+
   touch foo bar
 
 %test
diff -x CVS -ru ../zsh-forge/current/Test/A05execution.ztst ./Test/A05execution.ztst
--- ../zsh-forge/current/Test/A05execution.ztst	Mon Jul  9 10:41:34 2001
+++ ./Test/A05execution.ztst	Sun Aug 12 12:28:03 2001
@@ -7,7 +7,9 @@
   cd command.tmp
 
   print '#!/bin/sh\necho This is top' >tstcmd
+
   print '#!/bin/sh\necho This is dir1' >dir1/tstcmd
+
   print '#!/bin/sh\necho This is dir2' >dir2/tstcmd
 
   chmod 755 tstcmd dir1/tstcmd dir2/tstcmd
diff -x CVS -ru ../zsh-forge/current/Test/C02cond.ztst ./Test/C02cond.ztst
--- ../zsh-forge/current/Test/C02cond.ztst	Sat Jun  9 11:09:07 2001
+++ ./Test/C02cond.ztst	Sun Aug 12 12:52:11 2001
@@ -12,10 +12,12 @@
 
   touch zerolength
   chgrp $EGID zerolength
+
   print 'Garbuglio' >nonzerolength
 
   mkdir modish
   chgrp $EGID modish
+
   chmod g+xs modish
   chmod u+s modish
   chmod +t modish
@@ -85,7 +87,12 @@
   fi
 0dD:-p cond
 
-  [[ -r zerolength && ! -r unmodish ]]
+  if (( EUID == 0 )); then
+    print -u8 'Warning: Not testing [[ ! -r file ]] (root reads anything)'
+    [[ -r zerolength && -r unmodish ]]
+  else
+    [[ -r zerolength && ! -r unmodish ]]
+  fi
 0:-r cond
 
   [[ -s nonzerolength && ! -s zerolength ]]
diff -x CVS -ru ../zsh-forge/current/Test/D04parameter.ztst ./Test/D04parameter.ztst
--- ../zsh-forge/current/Test/D04parameter.ztst	Mon Jul  9 12:10:51 2001
+++ ./Test/D04parameter.ztst	Sun Aug 12 12:28:02 2001
@@ -3,7 +3,9 @@
 %prep
 
   mkdir parameter.tmp
+
   cd parameter.tmp
+
   touch boringfile evenmoreboringfile
 
 %test
diff -x CVS -ru ../zsh-forge/current/Test/E01options.ztst ./Test/E01options.ztst
--- ../zsh-forge/current/Test/E01options.ztst	Thu Jul 26 09:40:19 2001
+++ ./Test/E01options.ztst	Sun Aug 12 12:28:02 2001
@@ -82,8 +82,11 @@
 
 %prep
   mkdir options.tmp && cd options.tmp
+
   mkdir tmpcd
+
   touch tmpfile1 tmpfile2
+
   mydir=$PWD
   mydirt=`print -P %~`
   catpath=$(which cat)
diff -x CVS -ru ../zsh-forge/current/Test/E02xtrace.ztst ./Test/E02xtrace.ztst
--- ../zsh-forge/current/Test/E02xtrace.ztst	Mon Jul  9 12:10:51 2001
+++ ./Test/E02xtrace.ztst	Sun Aug 12 20:20:26 2001
@@ -2,6 +2,7 @@
 
 %prep
   mkdir xtrace.tmp && cd xtrace.tmp
+
   function xtf {
     local regression_test_dummy_variable
     print "$*"
@@ -81,3 +82,10 @@
 ?+(eval):21> . ./xt.in Tracing: source 2>file
 ?+./xt.in:1> print Tracing: source 2>file
 ?+(eval):22> set +x
+
+ typeset -ft xtf
+ xtf 'Tracing: function'
+0:
+>Tracing: function
+?+xtf:1> local regression_test_dummy_variable
+?+xtf:2> print Tracing: function
diff -x CVS -ru ../zsh-forge/current/Test/Y01completion.ztst ./Test/Y01completion.ztst
--- ../zsh-forge/current/Test/Y01completion.ztst	Sun Jun 24 20:03:00 2001
+++ ./Test/Y01completion.ztst	Sun Aug 12 12:28:01 2001
@@ -8,10 +8,10 @@
 
   comptestinit -z $ZTST_testdir/../Src/zsh &&
   {
-  mkdir dir1
-  mkdir dir2
-  touch file1
-  touch file2
+    mkdir dir1 &&
+    mkdir dir2 &&
+    touch file1 &&
+    touch file2
   }
 
 %test
diff -x CVS -ru ../zsh-forge/current/Test/Y03arguments.ztst ./Test/Y03arguments.ztst
--- ../zsh-forge/current/Test/Y03arguments.ztst	Mon Aug  6 09:03:02 2001
+++ ./Test/Y03arguments.ztst	Sun Aug 12 12:28:01 2001
@@ -8,8 +8,8 @@
 
   comptestinit -z $ZTST_testdir/../Src/zsh &&
   {
-  comptesteval 'compdef _tst tst'
-  tst_arguments () { comptesteval "_tst () { _arguments ${${(@qq)*}} }" }
+    comptesteval 'compdef _tst tst'
+    tst_arguments () { comptesteval "_tst () { _arguments ${${(@qq)*}} }" }
   }
 
 %test

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


                 reply	other threads:[~2001-08-22 15:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1010822154655.ZM23919@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).