2012-09-19 20:22:55 +00:00
|
|
|
/*jshint strict:true node:true es5:true onevar:true laxcomma:true laxbreak:true eqeqeq:true immed:true latedef:true*/
|
2011-09-09 20:56:22 +00:00
|
|
|
(function () {
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
var btoa = require('./index')
|
2012-09-19 20:22:55 +00:00
|
|
|
, encoded = "SGVsbG8sIBZM"
|
|
|
|
, unencoded = "Hello, 世界"
|
2011-09-09 20:56:22 +00:00
|
|
|
;
|
|
|
|
|
|
|
|
if (encoded !== btoa(unencoded)) {
|
2012-09-19 20:22:55 +00:00
|
|
|
console.error('[FAIL]', encoded, btoa(unencoded));
|
2011-09-09 20:56:22 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
console.log('[PASS] all tests pass');
|
|
|
|
}());
|