chardet/test/encodings/mbcs.js

44 lines
857 B
JavaScript
Raw Permalink Normal View History

var assert = require('assert'),
2013-11-22 04:40:19 +00:00
chardet = require('../../');
describe('Multybyte Character Sets', function() {
2013-11-22 04:40:19 +00:00
var base = __dirname + '/../data/encodings';
it('should return SHIFT-JIS', function() {
assert.equal(
chardet.detectFileSync(base + '/shiftjis'),
'Shift-JIS'
);
});
it('should return GB18030', function() {
assert.equal(
chardet.detectFileSync(base + '/gb18030'),
'GB18030'
);
});
it('should return Big5', function() {
assert.equal(
chardet.detectFileSync(base + '/big5'),
'Big5'
);
});
it('should return EUC-JP', function() {
assert.equal(
chardet.detectFileSync(base + '/euc_jp'),
'EUC-JP'
);
});
it('should return EUC-KR', function() {
assert.equal(
chardet.detectFileSync(base + '/euc_kr'),
'EUC-KR'
);
});
});