Blame view

public/assets/addons/fastflow/plugins/node-qrcode-master/test/unit/helper/sjis.test.js 435 Bytes
2db47680   hexiaodong   chore: 初始提交 php 遗...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
  const test = require('tap').test
  const toSJIS = require('helper/to-sjis')
  
  test('SJIS from char', function (t) {
    t.notOk(toSJIS(''),
      'Should return undefined if character is invalid')
  
    t.notOk(toSJIS('A'),
      'Should return undefined if character is not a kanji')
  
    t.equal(toSJIS('襦'), 0xe640,
      'Should return correct SJIS value')
  
    t.equal(toSJIS('¬'), 0x81ca,
      'Should return correct SJIS value')
  
    t.end()
  })