Permalink
Browse files

unicode test and text tests

  • Loading branch information...
1 parent 4423471 commit 0b7a3651c95f0a9a3dea4b81ce4e83bbead01ec8 Dane Springmeyer committed Jul 25, 2012
Showing with 17 additions and 0 deletions.
  1. +1 −0 test/data/Clément/Olá.txt
  2. BIN test/data/Clément/Olá.txt.zip
  3. +16 −0 test/unicode.test.js
@@ -0,0 +1 @@
+Olá
Binary file not shown.
View
@@ -0,0 +1,16 @@
+var zipfile = require('zipfile');
+var assert = require('assert');
+
+describe('Handling unicode paths, filenames, and data', function(){
+
+ it('open zip with unicode paths', function(){
+ var zf = new zipfile.ZipFile('./test/data/Clément/Olá.txt.zip');
+ assert.equal(zf.count, 1); // one folder, two files
+ assert.deepEqual(zf.names, ['Olá.txt']);
+ zf.names.forEach(function(name) {
+ var buffer = zf.readFileSync(name);
+ assert.equal(buffer.toString('utf8'),'Olá\n');
+ });
+ });
+
+});

0 comments on commit 0b7a365

Please sign in to comment.