Skip to content

Commit

Permalink
updated #74 with tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dbashford committed Feb 25, 2016
1 parent 97a3d24 commit 5994cf8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ textract.fromUrl(url, config, function( error, text ) {})

## Release Notes

### 1.3.0 (In progress)
* [#74](https://github.com/dbashford/textract/pull/74). PR fixing fancy double quotes -> “.

### 1.2.1
* [#68](https://github.com/dbashford/textract/pull/68). PR captured unzip errors.

Expand Down
14 changes: 13 additions & 1 deletion test/extract_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ describe('textract', function() {
fromFileWithPath(docPath, function( error, text ) {
expect(error).to.be.null;
expect(text).to.be.an('string');
expect(text.length).to.eql( 32398 );
console.log(text)
expect(text.length).to.eql( 32705 );
done();
});
});
Expand Down Expand Up @@ -326,6 +327,17 @@ describe('textract', function() {
done();
});
});

it('will not remove fancy quotes from a .txt file', function(done) {
var filePath = path.join( __dirname, "files", "fancyquote.txt" );
fromFileWithPath(filePath, function( error, text ) {
expect(error).to.be.null;
expect(text).to.be.a('string');
expect(text).to.eql( "this has \"fancy\" quotes" );
done();
});
});

});

describe('for .dxf files', function() {
Expand Down
1 change: 1 addition & 0 deletions test/files/fancyquote.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
this has “fancy“ quotes

0 comments on commit 5994cf8

Please sign in to comment.