zsh-workers
 help / color / mirror / code / Atom feed
* New D01 test failure
@ 2009-03-03  0:19 Vin Shelton
  2009-03-03  5:18 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Vin Shelton @ 2009-03-03  0:19 UTC (permalink / raw)
  To: Zsh hackers list

Greetings!

With today's CVS update:

P ChangeLog
P Completion/Unix/Command/_django
P Completion/Unix/Command/_gnupod
P Doc/Zsh/builtins.yo
P Doc/Zsh/calsys.yo
P Doc/Zsh/prompt.yo
P Src/builtin.c
P Src/utils.c

I'm seeing a new failure in the prompt expansion test.  This is on a
kubuntu 8.4 fully updated x86 system.

Details below.

Regards,
  Vin

Running test: Dates produced by prompt escapes
ZTST_test: expecting status: 0
Input: /tmp/zsh.ztst.in.22378, output: /tmp/zsh.ztst.out.22378, error:
/tmp/zsh.ztst.terr.22378
ZTST_execchunk: status 0
ZTST_test: test produced standard output:
Date `03/2/09' is not in the form `DD/MM/YYYY'
Date `09-03-2' is not in the form `YY-MM-DD'
ZTST_test: and standard error:
(eval):14: bad math expression: operand expected at `'
(eval):14: bad math expression: operand expected at `!= 2 '
*** /tmp/zsh.ztst.out.22378     Mon Mar  2 19:16:04 2009
--- /tmp/zsh.ztst.tout.22378    Mon Mar  2 19:16:04 2009
***************
*** 0 ****
--- 1,2 ----
+ Date `03/2/09' is not in the form `DD/MM/YYYY'
+ Date `09-03-2' is not in the form `YY-MM-DD'
Test /opt/src/zsh-2009-03-02/Test/D01prompt.ztst failed: output
differs from expected as shown above for:
  LC_ALL=C
  date1=$(print -P %w)
  date2=$(print -P %W)
  date3=$(print -P %D)
  if [[ $date1 != [A-Z][a-z][a-z][[:blank:]]##[0-9]## ]]; then
    print "Date \`$date1' is not in the form \`Day DD' (e.g. \`Mon 1'"
  fi
  if [[ $date2 != [0-9][0-9]/[0-9][0-9]/[0-9][0-9] ]]; then
    print "Date \`$date2' is not in the form \`DD/MM/YYYY'"
  fi
  if [[ $date3 != [0-9][0-9]-[0-9][0-9]-[0-9][0-9] ]]; then
    print "Date \`$date3' is not in the form \`YY-MM-DD'"
  fi
  if (( $date1[5,-1] != $date2[4,5] )) || (( $date2[4,5] != $date3[7,8] ))
  then
    print "Days of month do not agree in $date1, $date2, $date3"
  fi
  if (( $date2[1,2] != $date3[4,5] )); then
    print "Months do not agree in $date2, $date3"
  fi
  if (( $date2[7,8] != $date3[1,2] )); then
    print "Years do not agree in $date2, $date3"
  fi
Error output:
(eval):14: bad math expression: operand expected at `'
(eval):14: bad math expression: operand expected at `!= 2 '
Was testing: Dates produced by prompt escapes
/opt/src/zsh-2009-03-02/Test/D01prompt.ztst: test failed.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: New D01 test failure
  2009-03-03  0:19 New D01 test failure Vin Shelton
@ 2009-03-03  5:18 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2009-03-03  5:18 UTC (permalink / raw)
  To: Zsh hackers list

On Mar 2,  7:19pm, Vin Shelton wrote:
} Subject: New D01 test failure
}
} I'm seeing a new failure in the prompt expansion test.

This seems to do it.  The only bug was that (strip) should have
been (!strip), but I reversed the order of the || contitions to
match all the other uses of (!strip) in the same case statement.

Index: Src/utils.c
--- ../current/Src/utils.c    2009-03-02 17:57:29.000000000 -0800
+++ Src/utils.c 2009-03-02 21:15:36.000000000 -0800
@@ -2460,7 +2460,7 @@
                return -1;
            switch (*fmt++) {
            case 'd':
-               if (strip || tm->tm_mday > 9)
+               if (tm->tm_mday > 9 || !strip)
                    *buf++ = '0' + tm->tm_mday / 10;
                *buf++ = '0' + tm->tm_mday % 10;
                break;
@@ -3090,6 +3090,7 @@
     for (t0 = 0240; t0 != 0400; t0++)
        typtab[t0] = IALPHA | IALNUM | IIDENT | IUSER | IWORD;
 #endif


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-03-03  5:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-03  0:19 New D01 test failure Vin Shelton
2009-03-03  5:18 ` Bart Schaefer

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).