gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gm2] ISO Modula-2 text filter examples available now on Google Code


From: john o goyo
Subject: Re: [Gm2] ISO Modula-2 text filter examples available now on Google Code
Date: Wed, 10 Apr 2013 10:35:31 -0400

Greetings:

On 6-Apr-13, at 7:01 PM, Carl Glassberg wrote:
Hello:

I have been trying out some tests on the text filter programs using the following operating system commands, available on the Unix-like Mac OS X and therefore I assume available on most other Unix-like systems (Linux, BSD, etc.)

Excuse me for being pedantic but OS X is UNIX. (Vide http://www.opengroup.org/openbrand/register/brand3591.htm) .


[...]
I prefer a testing solution that allows the user to create his own test text files and use the above operating system commands to compare input to output:

If filter1 reverses the effects of filter0, then you can do:

filter0 < fn1 > fn2
filter1 < fn2 > fn3
diff -s fn1 fn3

"diff" should give an "identical files" message although one may need to account for white-space differences. Also filter0 and filter1 may not be exact inverses of each other.

I have been doing those sorts of tests.

The end-of-line conversion scripts using "perl" (or the equivalent) are useful for determining if the filters are handling end-of-line as expected.

In addition, tests should be performed on 0 length files, files with various quantities of blank lines, blank lines with leading and trailing white-space, files with a final eol mark immediately preceding the physical end-of-file and those without such a final eol, and so on.

Would this testing solution be ok?

Thank you for your notes on testing. I was suggesting an ISO-Modula pogramme that would produce before- and correct after-filtering files (using the RawIO functions). This would act as a regression test as one can compare with known results.

So if the regression test produced files, filtertest1.before filtertest1.after and so on, you would run the filter on filtertest1.before
and compare the output with filtertest1.after, and so on.

Thank you for considering this.

john


I would supply a Wiki page specifying the commands to type into the console and any other steps needed to perform the tests.

I don't plan to automate the testing because there are too many variables(what Modula2 is running under what O/S).

Sincerely
Carl Glassberg
---


--- On Thu, 4/4/13, john o goyo <address@hidden> wrote:

From: john o goyo <address@hidden>
Subject: Re: ISO Modula-2 text filter examples available now on Google Code
To: "Carl Glassberg" <address@hidden>
Cc: "GNU Modula-2" <address@hidden>
Date: Thursday, April 4, 2013, 6:08 AM
Greetings:

On 2-Apr-13, at 9:45 AM, Carl Glassberg wrote:
Hello:

Until I can figure out how to upload, you will need to
go to the Wiki pages for the project.

Your source compiles cleanly with gm2 on
Solaris-sparc.  It would be most helpful if you wrote a
programme to produce test files (before and after
filtering).

john







reply via email to

[Prev in Thread] Current Thread [Next in Thread]