Dieses Repository beinhaltet HTML- und Javascript Code zur einer NotizenWebApp auf Basis von Web Storage. Zudem sind Mocha/Chai Tests im Browser enthalten. https://meinenotizen.netlify.app/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

partitioned_unicode.js 743B

12345678910111213141516171819202122232425262728293031323334
  1. var it = require('it-is').style('colour')
  2. , split = require('..')
  3. exports ['split data with partitioned unicode character'] = function (test) {
  4. var s = split(/,/g)
  5. , caughtError = false
  6. , rows = []
  7. s.on('error', function (err) {
  8. caughtError = true
  9. })
  10. s.on('data', function (row) { rows.push(row) })
  11. var x = 'テスト試験今日とても,よい天気で'
  12. unicodeData = new Buffer(x);
  13. // partition of 日
  14. piece1 = unicodeData.slice(0, 20);
  15. piece2 = unicodeData.slice(20, unicodeData.length);
  16. s.write(piece1);
  17. s.write(piece2);
  18. s.end()
  19. it(caughtError).equal(false)
  20. it(rows).deepEqual(['テスト試験今日とても', 'よい天気で']);
  21. it(rows).deepEqual(x.split(','))
  22. test.done()
  23. }