chardet/test/encodings/iso2022.js

29 lines
676 B
JavaScript
Raw Normal View History

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