chardet/test/encodings/unicode.js

36 lines
817 B
JavaScript
Raw Normal View History

2013-04-29 14:31:48 +00:00
var assert = require('assert'),
chardet = require('../../');
describe('Unicode', function() {
var base = __dirname + '/../data/encodings';
2013-04-29 14:31:48 +00:00
it('should return UTF-16LE', function() {
assert.equal(
chardet.detectFileSync(base + '/utf16le'),
2013-04-29 14:31:48 +00:00
'UTF-16LE'
);
});
it('should return UTF-16BE', function() {
assert.equal(
chardet.detectFileSync(base + '/utf16be'),
2013-04-29 14:31:48 +00:00
'UTF-16BE'
);
});
it('should return UTF-32LE', function() {
assert.equal(
chardet.detectFileSync(base + '/utf32le'),
2013-04-29 14:31:48 +00:00
'UTF-32LE'
);
});
it('should return UTF-32BE', function() {
assert.equal(
chardet.detectFileSync(base + '/utf32be'),
2013-04-29 14:31:48 +00:00
'UTF-32BE'
);
});
});