2013-04-29 14:31:48 +00:00
|
|
|
|
|
|
|
var assert = require('assert'),
|
2013-04-30 13:49:02 +00:00
|
|
|
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(
|
2013-04-30 13:49:02 +00:00
|
|
|
chardet.detectFileSync(base + '/iso2022jp'),
|
2013-04-29 14:31:48 +00:00
|
|
|
'ISO-2022-JP'
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should return ISO-2022-KR', function() {
|
|
|
|
assert.equal(
|
2013-04-30 13:49:02 +00:00
|
|
|
chardet.detectFileSync(base + '/iso2022kr'),
|
2013-04-29 14:31:48 +00:00
|
|
|
'ISO-2022-KR'
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should return ISO-2022-CN', function() {
|
|
|
|
assert.equal(
|
2013-04-30 13:49:02 +00:00
|
|
|
chardet.detectFileSync(base + '/iso2022cn'),
|
2013-04-29 14:31:48 +00:00
|
|
|
'ISO-2022-CN'
|
|
|
|
);
|
|
|
|
});
|
|
|
|
});
|