[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 05no-escape-on-AT_CHECK-strings
From: |
Derek Robert Price |
Subject: |
Re: 05no-escape-on-AT_CHECK-strings |
Date: |
Tue, 08 Apr 2003 11:00:01 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 |
Akim Demaille wrote:
| Akim Demaille wrote:
| > Derek> Akim Demaille wrote:
| > >> I am absolutely against this patch. Revert it.
| > >> >> If you want something like this, you will first need to
| > explain it.
| > >> Derek> Again, CVS's current test suite often compares program
| > output against
| > Derek> shell variables defined earlier in the script.
| >
| >Then save these values in an expout file, and use [expout] as STDOUT
| >value.
| >
|
| The CVS test suite uses this almost every test. I could implement
| this as an m4 macro in the CVS test suite, but had thought it had some
| more general usefulness. How would you feel about an extra macro,
| perhaps AT_CHECK_NOESCAPE or the like which ran AT_CHECK to expout
| then allowed shell expansion on the args before comparison?
This, why not.
Ok. Patch will follow.
| I also wanted to implement an AT_CHECK_EXPR (now AT_CHECK_EXPR &
| AT_CHECK_EXPR_NOESCAPE?) which used expr rather than diff to compare
| the strings.
expr suffers from severe limitations, including portability issues.
Hrm, yeah. I was thinking the CVS test suite dealt with expr fine, but
I just looked and realized that part of the way it deals is by
gracefully detecting the problem with expr and telling the user that the
test suite isn't going to run until they replace expr. There are a few
cases where CVS substs env vars with values for literal `+', `?', end of
line anchor, and a variant of `.*' which will match a newline across
platforms, and it does search the path until it finds an expr which
looks like GNU expr if it finds a broken expr, but it just gives up on
some platforms when it finds a broken expr and no GNU expr.
| One example of where this is useful with CVS is in that
| CVS's includes dates in much of its output. Since these dates change
| depending on when the test is run, CVS's test suite often uses
| ${DATE}, which expands to a regexp which will match the date format
| though no particular date, to match dates in tests where the date is
| not the central issue being tested.
This is where I suggest a wrapper that smashes these differences.
Hrm. What sort of wrapper are you suggesting? sed'ing the differences
into an empty string or some literal? Did you have something else in
mind? You probably have a better idea of what will be portable than I do.
Derek
--
*8^)
Email: address@hidden
Get CVS support at <http://ximbiot.com>!
--
If thou dost marry, I'll give thee this plague for
thy dowry: be thou as chaste as ice, as pure as snow,
thou shalt not escape calumny. Get thee to a nunnery.
Go, farewell. Or if thou wilt needs marry, marry a fool.
For wise men know well enough what monsters you
make of them. To a nunnery, go, and quickly, too. Fare-
well.
- Hamlet, Act III, Scene 1, Lines 135-141