ringojs on WIndows test failure.

已查看 29 次
跳至第一个未读帖子

Peter Wilson

未读,
2011年2月3日 20:24:212011/2/3
收件人 RingoJS
I've just installed ringojs on Windows 7 and have run the unit test
suite.
Several tests are failing because the Array.join does not seem to
assemble file paths correctly.

Running testGetResource...
FAILED

Expected "C:\Program Files\ringojs\test\repository\data.zip
\test.txt", got "C:\Program Files\ringojs\test\repository\data.zip/
test.txt"
at C:\Program Files\ringojs\test\repository\common.js:12
at actions.js:38
at ringo/webapp.js:85
at ringo/webapp.js:42
at ringo/middleware/notfound.js:26
at ringo/middleware/error.js:30
at ringo/middleware/responselog.js:29
at ringo/middleware/static.js:45
at ringo/middleware/etag.js:19
at ringo/middleware/gzip.js:19
at ringo/jsgi.js:41

Note the Unix "/" immediately before the file name test.txt.

I have tried hard-wiring SEPARATOR as "\" with no result.

Otherwise, looks good so far.

I'll make notes on Windows setup and let you know what's involved.

p.s.ringo.bat, ringo-admin.bat etc.would be useful in the bin folder
so that new Windows users don't have to figure out the java command
line.

Andreas Bolka

未读,
2011年2月4日 01:48:282011/2/4
收件人 ringojs
On Fri Feb 04 02:24:21 +0100 2011, Peter Wilson wrote:
> I've just installed ringojs on Windows 7 and have run the unit test
> suite. Several tests are failing because the Array.join does not seem
> to assemble file paths correctly.

Thanks for this bug report. Which version of RingoJS did you encounter
this behaviour with?

> p.s.ringo.bat, ringo-admin.bat etc.would be useful in the bin folder
> so that new Windows users don't have to figure out the java command
> line.

ringo.cmd and ringo-admin.cmd don't suffice?

--
a

Philipp Naderer / Botic

未读,
2011年2月4日 05:39:332011/2/4
收件人 rin...@googlegroups.com
I ran the tests on my workstation at work: RingoJS 0.7 on Windows XP, 3 failed tests.

  + Running testRepository ...
   + Running testZip ...
     + Running testGetResource ... FAILED
   Expected "D:\ringojs\ringojs-0.7\test\repository\data.zip\test.txt", got "D:\
ringojs\ringojs-0.7\test\repository\data.zip/test.txt"
   at D:\ringojs\ringojs-0.7\test\repository\common.js:12
   at D:\ringojs\ringojs-0.7\test\all.js:17

     + Running testGetNestedResource ... FAILED
   Expected "D:\ringojs\ringojs-0.7\test\repository\data.zip\nested\nested.txt",
 got "D:\ringojs\ringojs-0.7\test\repository\data.zip/nested/nested.txt"
   at D:\ringojs\ringojs-0.7\test\repository\common.js:21
   at D:\ringojs\ringojs-0.7\test\all.js:17

     + Running testNonExistingResource ... PASSED (0 ms)
     + Running testNestedNonExistingResource ... PASSED (0 ms)
     + Running testGetRepositories ... PASSED (0 ms)
     + Running testGetResources ... PASSED (0 ms)
     + Running testGetRecursiveResources ... FAILED
   Expected "D:\ringojs\ringojs-0.7\test\repository\data.zip\test.txt", got "D:\
ringojs\ringojs-0.7\test\repository\data.zip/test.txt"
   at D:\ringojs\ringojs-0.7\test\repository\common.js:60
   at D:\ringojs\ringojs-0.7\test\all.js:17

     + Running testGetNestedResources ... PASSED (0 ms)
   + Running testFile ...

Peter Wilson

未读,
2011年2月4日 19:26:462011/2/4
收件人 RingoJS

> ringo.cmd and ringo-admin.cmd don't suffice?
>
> --
Yes it will. I don't use batch files very often, I was not aware of
this file suffix as a Windows command file.

As Philip Naderer has already commented the ringo version was 0.7.

Peter

Barton

未读,
2011年2月8日 18:44:402011/2/8
收件人 RingoJS
I just downloaded today and tried on windows7 and had multiple
failures as indicated above

Running testGetResource...
FAILED

Expected "C:\Tools\ringojs-0.7\test\repository\data.zip\test.txt",
got "C:\Tools\ringojs-0.7\test\repository\data.zip/test.txt"
at
and
Running testGetNestedResource...
FAILED

Expected "C:\Tools\ringojs-0.7\test\repository\data.zip\nested
\nested.txt", got "C:\Tools\ringojs-0.7\test\repository\data.zip/
nested/nested.txt"

and
Running testGetRecursiveResources...
FAILED

Expected "C:\Tools\ringojs-0.7\test\repository\data.zip\test.txt",
got "C:\Tools\ringojs-0.7\test\repository\data.zip/test.txt"
at C:\Tools\ringojs-0.7\test\repository\common.js:60


FWIW

Philipp Naderer / Botic

未读,
2011年2月16日 11:27:292011/2/16
收件人 rin...@googlegroups.com
I tested it on my WinXP machine and also tried to fix it:*

src/org/ringojs/repository/ZipRepository.java:
Line 75:
path = file.getPath() + "/"; --> path = file.getPath() + File.separator;

Line 100:
path = parent.getPath() + name  + "/"; --> path = parent.getPath() + name  + File.separator;

After that two changes the tests were green again, but their are still 2 other uses of a hardcoded "/" as separator in the ZipRepository.java. It looks like ZIP files use "/" as seperator, so that could be ignored.

bye,
Philipp

*) On this machine there is no git etc. installed, so I send the changes as "human-readable-path"
回复全部
回复作者
转发
0 个新帖子