提交 8ce105c9 编写于 作者: Z zWX1234017
上级 b2f24fcc
......@@ -1912,6 +1912,18 @@ describe('BufferTest', function () {
expect(str).assertEqual("this is a test");
});
/**
* @tc.name: testfrom0269
* @tc.desc: Create a new buffer containing a newline character string. Creating using base64 encoding
* For example: buffer.from(string, encoding);
*/
it("testfrom0269", 0, function () {
const str = `MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC/OgIQLaulKklB\npZltSaWwM3Cnzcmvh+LoqYFYjCePUxnoJRDusFqy4sjwBx9fn/XSxxJ9A0KxMtXa\nr7YFjwQo3FsIjLZ3+8wS+Kydcg==`;
const buf = buffer.from(str, 'base64');
let ref = buf.readInt8(buf.length - 1);
expect(ref).assertEqual(114);
});
/**
* @tc.name: testBlobConstructor0270
* @tc.desc: Creates a new Blob object containing a concatenation of the given sources.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册