2020-08-24 17:16:35 +09:00
|
|
|
import test from 'ava'
|
2020-08-03 15:34:58 +09:00
|
|
|
|
|
|
|
const bindings = require('../index.node')
|
|
|
|
|
|
|
|
test('should be able to concat string', (t) => {
|
|
|
|
const fixture = 'JavaScript 🌳 你好 napi'
|
|
|
|
t.snapshot(bindings.concatString(fixture))
|
|
|
|
})
|
2020-09-03 20:11:30 +09:00
|
|
|
|
2021-08-13 19:39:02 +09:00
|
|
|
test('should be able to concat utf16 string', (t) => {
|
|
|
|
const fixture = 'JavaScript 🌳 你好 napi'
|
|
|
|
t.snapshot(bindings.concatUTF16String(fixture))
|
|
|
|
})
|
|
|
|
|
2020-09-03 20:11:30 +09:00
|
|
|
test('should be able to concat latin1 string', (t) => {
|
|
|
|
const fixture = '涽¾DEL'
|
|
|
|
t.snapshot(bindings.concatLatin1String(fixture))
|
|
|
|
})
|
|
|
|
|
|
|
|
test('should be able to crate latin1 string', (t) => {
|
|
|
|
t.snapshot(bindings.createLatin1())
|
|
|
|
})
|