* gnu/testlet/java/util/jar/JarFile/basic.java
@ 2003-02-04 9:40 Raif S. Naffah
2003-02-04 14:41 ` gnu/testlet/java/util/jar/JarFile/basic.java Stephen Crawley
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Raif S. Naffah @ 2003-02-04 9:40 UTC (permalink / raw)
To: Mauve
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
hello there,
as of today, trying to compile the Mauve testsuite causes:
Found 1 lexical error in "gnu/testlet/java/util/jar/JarFile/basic.java":
71. ` item++;
^
*** Lexical Error: Illegal token.
cheers;
rsn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Que du magnifique
iD8DBQE+P4sq+e1AKnsTRiERA/JiAJ97+hIqRf5+s0PJZbptKYLUIFDabgCgxbrO
Su78jRAjA/Z8g7QNkrwTlC4=
=qpC3
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gnu/testlet/java/util/jar/JarFile/basic.java
2003-02-04 9:40 gnu/testlet/java/util/jar/JarFile/basic.java Raif S. Naffah
@ 2003-02-04 14:41 ` Stephen Crawley
2003-02-04 15:50 ` gnu/testlet/java/util/jar/JarFile/basic.java John Leuner
2003-02-04 19:33 ` gnu/testlet/java/util/jar/JarFile/basic.java Brian Jones
2 siblings, 0 replies; 5+ messages in thread
From: Stephen Crawley @ 2003-02-04 14:41 UTC (permalink / raw)
To: raif; +Cc: Mauve, crawley
> Found 1 lexical error in "gnu/testlet/java/util/jar/JarFile/basic.java":
>
> 71. ` item++;
> ^
> *** Lexical Error: Illegal token.
I've fixed it
-- Steve
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gnu/testlet/java/util/jar/JarFile/basic.java
2003-02-04 9:40 gnu/testlet/java/util/jar/JarFile/basic.java Raif S. Naffah
2003-02-04 14:41 ` gnu/testlet/java/util/jar/JarFile/basic.java Stephen Crawley
@ 2003-02-04 15:50 ` John Leuner
2003-02-13 20:27 ` gnu/testlet/java/util/jar/JarFile/basic.java Mark Wielaard
2003-02-04 19:33 ` gnu/testlet/java/util/jar/JarFile/basic.java Brian Jones
2 siblings, 1 reply; 5+ messages in thread
From: John Leuner @ 2003-02-04 15:50 UTC (permalink / raw)
To: raif; +Cc: Mauve
[-- Attachment #1: Type: text/plain, Size: 543 bytes --]
On Tue, 2003-02-04 at 09:43, Raif S. Naffah wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: RIPEMD160
>
> hello there,
>
> as of today, trying to compile the Mauve testsuite causes:
>
>
> Found 1 lexical error in "gnu/testlet/java/util/jar/JarFile/basic.java":
>
> 71. ` item++;
> ^
> *** Lexical Error: Illegal token.
>
Sorry, that must have slipped in somehow.
I'm not sure if this test is correct, particularly the JarFile.entries()
tests.
--
John Leuner <jewel@pixie.co.za>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gnu/testlet/java/util/jar/JarFile/basic.java
2003-02-04 9:40 gnu/testlet/java/util/jar/JarFile/basic.java Raif S. Naffah
2003-02-04 14:41 ` gnu/testlet/java/util/jar/JarFile/basic.java Stephen Crawley
2003-02-04 15:50 ` gnu/testlet/java/util/jar/JarFile/basic.java John Leuner
@ 2003-02-04 19:33 ` Brian Jones
2 siblings, 0 replies; 5+ messages in thread
From: Brian Jones @ 2003-02-04 19:33 UTC (permalink / raw)
To: raif; +Cc: Mauve
"Raif S. Naffah" <raif@fl.net.au> writes:
> hello there,
>
> as of today, trying to compile the Mauve testsuite causes:
>
>
> Found 1 lexical error in "gnu/testlet/java/util/jar/JarFile/basic.java":
>
> 71. ` item++;
> ^
> *** Lexical Error: Illegal token.
>
>
> cheers;
> rsn
>
>
This was just checked in by someone testing some Jar stuff. If you
know a simple fix check it in.
--
Brian Jones <cbj@gnu.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gnu/testlet/java/util/jar/JarFile/basic.java
2003-02-04 15:50 ` gnu/testlet/java/util/jar/JarFile/basic.java John Leuner
@ 2003-02-13 20:27 ` Mark Wielaard
0 siblings, 0 replies; 5+ messages in thread
From: Mark Wielaard @ 2003-02-13 20:27 UTC (permalink / raw)
To: John Leuner; +Cc: raif, Mauve
[-- Attachment #1: Type: text/plain, Size: 731 bytes --]
Hi,
On Tue, 2003-02-04 at 16:45, John Leuner wrote:
> I'm not sure if this test is correct, particularly the JarFile.entries()
> tests.
I think this test is a bit to strict. I could not found any order that
the Enumeration should follow. When the order of the entries matters an
application should probably use JarInputStream anyway. I have changed
the test a little so that it only tests that the number of entries and
the name and content of each entry match.
2003-02-13 Mark Wielaard <mark@klomp.org>
* gnu/testlet/java/util/jar/JarFile/basic.java: Don't test order,
only test that all entries have the correct content.
If there are applications for which the order matters I like to hear
about them.
Cheers,
Mark
[-- Attachment #2: basic.diff --]
[-- Type: text/x-patch, Size: 2753 bytes --]
Index: gnu/testlet/java/util/jar/JarFile/basic.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/util/jar/JarFile/basic.java,v
retrieving revision 1.2
diff -u -r1.2 basic.java
--- gnu/testlet/java/util/jar/JarFile/basic.java 4 Feb 2003 14:40:01 -0000 1.2
+++ gnu/testlet/java/util/jar/JarFile/basic.java 13 Feb 2003 20:25:16 -0000
@@ -43,33 +43,31 @@
But it would seem likely that someone will write a program expecting the files to be enumerated the same way every time
*/
- int item = 1;
+ int item = 0;
Enumeration e = jarfile.entries();
while(e.hasMoreElements())
{
JarEntry je = (JarEntry) e.nextElement();
+ String n = je.getName();
String s = new BufferedReader(new InputStreamReader(jarfile.getInputStream(je))).readLine();
- switch(item)
- {
- case 1:
- harness.check(s == null);
- break;
- case 2:
- harness.check(s.equals("Manifest-Version: 1.0"));
- break;
- case 3:
- harness.check(s.equals("this jar file was created with the jar tool for IBM JDK 1.3"));
- break;
- case 4:
- harness.check(s.equals("We seek peace. We strive for peace. And sometimes peace must be defended. A future lived at the mercy of terrible threats is no peace at all. If war is forced upon us, we will fight in a just cause and by just means -- sparing, in every way we can, the innocent. And if war is forced upon us, we will fight with the full force and might of the United States military -- and we will prevail."));
- break;
- case 5:
- harness.check(s.equals("I am he as you are he as you are me and we are all together."));
- break;
- }
- // System.out.println("item " + item + " and string '" + s + "'");
+
+ if ("META-INF/".equals(n))
+ harness.check(s == null);
+ else if ("META-INF/MANIFEST.MF".equals(n))
+ harness.check(s.equals("Manifest-Version: 1.0"));
+ else if ("file1".equals(n))
+ harness.check(s.equals("this jar file was created with the jar tool for IBM JDK 1.3"));
+ else if ("file2".equals(n))
+ harness.check(s.equals("We seek peace. We strive for peace. And sometimes peace must be defended. A future lived at the mercy of terrible threats is no peace at all. If war is forced upon us, we will fight in a just cause and by just means -- sparing, in every way we can, the innocent. And if war is forced upon us, we will fight with the full force and might of the United States military -- and we will prevail."));
+ else if ("file3".equals(n))
+ harness.check(s.equals("I am he as you are he as you are me and we are all together."));
+ else
+ harness.check(false, "Unexpected entry: " + n);
+
item++;
}
+
+ harness.check(item, 5);
jarfile.close();
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-02-13 20:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-04 9:40 gnu/testlet/java/util/jar/JarFile/basic.java Raif S. Naffah
2003-02-04 14:41 ` gnu/testlet/java/util/jar/JarFile/basic.java Stephen Crawley
2003-02-04 15:50 ` gnu/testlet/java/util/jar/JarFile/basic.java John Leuner
2003-02-13 20:27 ` gnu/testlet/java/util/jar/JarFile/basic.java Mark Wielaard
2003-02-04 19:33 ` gnu/testlet/java/util/jar/JarFile/basic.java Brian Jones
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 read-only IMAP folder(s) and NNTP newsgroup(s).