chardet/test/encodings/iso2022.js

29 lines
600 B
JavaScript
Raw Permalink Normal View History

2013-04-29 14:31:48 +00:00
var assert = require('assert'),
2013-11-22 04:40:19 +00:00
chardet = require('../../');
describe('ISO-2022', function() {
2013-11-22 04:40:19 +00:00
var base = __dirname + '/../data/encodings';
2013-04-29 14:31:48 +00:00
2013-11-22 04:40:19 +00:00
it('should return ISO-2022-JP', function() {
assert.equal(
chardet.detectFileSync(base + '/iso2022jp'),
'ISO-2022-JP'
);
});
2013-04-29 14:31:48 +00:00
2013-11-22 04:40:19 +00:00
it('should return ISO-2022-KR', function() {
assert.equal(
chardet.detectFileSync(base + '/iso2022kr'),
'ISO-2022-KR'
);
});
2013-04-29 14:31:48 +00:00
2013-11-22 04:40:19 +00:00
it('should return ISO-2022-CN', function() {
assert.equal(
chardet.detectFileSync(base + '/iso2022cn'),
'ISO-2022-CN'
);
});
});