From 84bff8b74b7ea6983eb3d02e149340be19307711 Mon Sep 17 00:00:00 2001 From: Vitaly Puzrin Date: Sat, 29 Mar 2014 04:23:23 +0400 Subject: [PATCH] reorganized fixtures --- test/fixtures/{header/test.gz => gzip-headers.gz} | Bin test/fixtures/{ => samples}/blank.gif | Bin test/fixtures/{ => samples}/lorem.txt | 0 test/fixtures/{ => samples}/lorem_cat.jpeg | Bin test/fixtures/{ => samples}/lorem_en_100k.txt | 0 test/fixtures/{ => samples}/lorem_utf_100k.txt | 0 test/fixtures/{ => samples}/utf8.zip | Bin test/helpers.js | 5 +---- test/inflate_cover.js | 2 +- 9 files changed, 2 insertions(+), 5 deletions(-) rename test/fixtures/{header/test.gz => gzip-headers.gz} (100%) rename test/fixtures/{ => samples}/blank.gif (100%) rename test/fixtures/{ => samples}/lorem.txt (100%) rename test/fixtures/{ => samples}/lorem_cat.jpeg (100%) rename test/fixtures/{ => samples}/lorem_en_100k.txt (100%) rename test/fixtures/{ => samples}/lorem_utf_100k.txt (100%) rename test/fixtures/{ => samples}/utf8.zip (100%) diff --git a/test/fixtures/header/test.gz b/test/fixtures/gzip-headers.gz similarity index 100% rename from test/fixtures/header/test.gz rename to test/fixtures/gzip-headers.gz diff --git a/test/fixtures/blank.gif b/test/fixtures/samples/blank.gif similarity index 100% rename from test/fixtures/blank.gif rename to test/fixtures/samples/blank.gif diff --git a/test/fixtures/lorem.txt b/test/fixtures/samples/lorem.txt similarity index 100% rename from test/fixtures/lorem.txt rename to test/fixtures/samples/lorem.txt diff --git a/test/fixtures/lorem_cat.jpeg b/test/fixtures/samples/lorem_cat.jpeg similarity index 100% rename from test/fixtures/lorem_cat.jpeg rename to test/fixtures/samples/lorem_cat.jpeg diff --git a/test/fixtures/lorem_en_100k.txt b/test/fixtures/samples/lorem_en_100k.txt similarity index 100% rename from test/fixtures/lorem_en_100k.txt rename to test/fixtures/samples/lorem_en_100k.txt diff --git a/test/fixtures/lorem_utf_100k.txt b/test/fixtures/samples/lorem_utf_100k.txt similarity index 100% rename from test/fixtures/lorem_utf_100k.txt rename to test/fixtures/samples/lorem_utf_100k.txt diff --git a/test/fixtures/utf8.zip b/test/fixtures/samples/utf8.zip similarity index 100% rename from test/fixtures/utf8.zip rename to test/fixtures/samples/utf8.zip diff --git a/test/helpers.js b/test/helpers.js index bf95058..fe5e106 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -14,12 +14,9 @@ var pako = require('../index'); // function loadSamples() { var result = {}; - var dir = path.join(__dirname, 'fixtures'); + var dir = path.join(__dirname, 'fixtures/samples'); fs.readdirSync(dir).sort().forEach(function (sample) { - if (fs.statSync(path.join(dir, sample)).isDirectory()) { - return; - } var filepath = path.join(dir, sample), extname = path.extname(filepath), basename = path.basename(filepath, extname), diff --git a/test/inflate_cover.js b/test/inflate_cover.js index 3bd0fd5..48b289e 100644 --- a/test/inflate_cover.js +++ b/test/inflate_cover.js @@ -66,7 +66,7 @@ describe('Inflate states', function() { describe('Inflate gzip header', function() { it('Check headers content from prepared file', function() { - var data = fs.readFileSync(path.join(__dirname, 'fixtures/header/test.gz')); + var data = fs.readFileSync(path.join(__dirname, 'fixtures/gzip-headers.gz')); var inflator = new pako.Inflate(); inflator.push(data, true);