r9720 - in helma-ng/trunk: . modules/test/helma
[email protected] Fri, 8 May 2009 12:22:14 +0200 (CEST)
| Newsgroups | gmane.comp.java.helma.cvs |
|---|---|
| Message-ID | <20090508102214.444473D0D6@mia> |
Author: hannes
Date: 2009-05-08 12:22:14 +0200 (Fri, 08 May 2009)
New Revision: 9720
Added:
helma-ng/trunk/.gitignore
Modified:
helma-ng/trunk/README.txt
helma-ng/trunk/modules/test/helma/file_test.js
Log:
fixed file_test to close file in ReadWriteFile test. Added shell module import, otherwise get error
when writeln is called. Fixed typos in Readme.
Details at http://dev.helma.org/trac/helma/changeset/9720
Added: helma-ng/trunk/.gitignore
Modified: helma-ng/trunk/README.txt
===================================================================
--- helma-ng/trunk/README.txt 2009-05-07 13:37:43 UTC (rev 9719)
+++ helma-ng/trunk/README.txt 2009-05-08 10:22:14 UTC (rev 9720)
@@ -66,7 +66,7 @@
helma test/all
Run helma with the -h or --help switch to get more information about available
-command line options. For exapmle, the -i or --interactive option allows you
+command line options. For example, the -i or --interactive option allows you
to run an application and use the shell at the same time, which can be really
handy.
@@ -84,10 +84,10 @@
the one of ordinary client-side JavaScript runtime.
Helma uses the concept of a module path to look up and load modules that is
-similar to the PATH environment variable used ot find executables on most
+similar to the PATH environment variable used to find executables on most
operating systems. By default, the module path consists of two entries:
- 1. The application root, which is the parent directory of the comman line
+ 1. The application root, which is the parent directory of the command line
script, or the current working directory if called without script
argument.
2. The system modules root, which corresponds to the modules directory in
@@ -95,7 +95,7 @@
Helma NG provides several ways to access and set the module path. The simplest
is to set the HELMA_MODULE_PATH environment variable, separating multiple entries
-with ':' or whatever character is used to seprate PATH entries on your system:
+with ':' or whatever character is used to separate PATH entries on your system:
export HELMA_MODULE_PATH=../foo/lib:../my/lib
Modified: helma-ng/trunk/modules/test/helma/file_test.js
===================================================================
--- helma-ng/trunk/modules/test/helma/file_test.js 2009-05-07 13:37:43 UTC (rev 9719)
+++ helma-ng/trunk/modules/test/helma/file_test.js 2009-05-08 10:22:14 UTC (rev 9720)
@@ -1,4 +1,5 @@
include('helma/unittest');
+include('helma/shell');
var {File} = require('helma/file');
require('core/string');
@@ -18,6 +19,12 @@
}
}
+testCase.removeFile = function() {
+ var file = new File(filename);
+ file.remove();
+ assertFalse(file.exists());
+}
+
testCase.testReadWriteFile = function() {
var file = new File(filename);
file.remove();
@@ -35,6 +42,7 @@
file.open();
var line = file.readln();
assertEqual(line, string1 + string2);
+ file.close();
}
testCase.testEncoding = function() {