Permalink
Browse files

windows tweaks to unicode tests again

  • Loading branch information...
1 parent 912b9af commit 09dfe466551d7aa028ffc70dec6c2dca1a37da6d Dane Springmeyer committed Jan 17, 2013
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -0,0 +1,2 @@
+x,y
+0,0
Binary file not shown.
View
@@ -11,18 +11,18 @@ describe('Handling unicode paths, filenames, and data', function(){
var zf = new zipfile.ZipFile(zippath);
assert.equal(zf.count, 3);
var buffer = zf.readFileSync(zf.names[0]);
- assert.equal(buffer.toString('utf8'),fs.readFileSync(zippath.replace('.zip','')).toString('utf8'));
+ assert.equal(buffer.toString('utf8'),fs.readFileSync(zippath.replace('.zip','')).toString('utf8').replace(/\r/g,''));
});
it('open zip with folder and file with unicode', function(){
- var zippath = './test/data/Clément/Olá.txt.zip';
+ var zippath = './test/data/Clément/Olá.zip';
assert.ok(existsSync(zippath));
var zf = new zipfile.ZipFile(zippath);
assert.equal(zf.count, 1);
});
it('open zip with unicode paths and unicode filenames in archive', function(){
- var zippath = './test/data/Clément/Olá.txt.zip';
+ var zippath = './test/data/Clément/Olá.zip';
assert.ok(existsSync(zippath));
var zf = new zipfile.ZipFile(zippath);
assert.equal(zf.count, 1);
@@ -41,7 +41,7 @@ describe('Handling unicode paths, filenames, and data', function(){
assert.equal(zf.count, 3);
assert.deepEqual(zf.names, ["你好_points.csv","__MACOSX/","__MACOSX/._你好_points.csv"]);
var buffer = zf.readFileSync(zf.names[0]);
- assert.equal(buffer.toString('utf8'),fs.readFileSync('./test/data/你好_points.csv').toString('utf8'));
+ assert.equal(buffer.toString('utf8'),fs.readFileSync('./test/data/你好_points.csv').toString('utf8').replace(/\r/g,''));
});
});

0 comments on commit 09dfe46

Please sign in to comment.