提交 222e2162 编写于 作者: 杜庆泉's avatar 杜庆泉

补充 null 变量模板字符串 toString测试

上级 5e1b769d
......@@ -595,6 +595,25 @@ export function testString() : Result {
expect(str1.startsWith("not to be", 10)).toEqual(true);
expect(str1.startsWith("not to be", 8)).toEqual(false);
})
test("toStringNullTest1", () => {
const visibilitylist = {
v: 'visible',
h: 'hidden',
c: 'collapse'
}
let b:string = `fdsfa${visibilitylist['n']}`
expect(b).toEqual("fdsfanull");
let a:Number|null = null
let ab:string = `aaa${a}`
expect(ab).toEqual("aaanull");
let c:Any|null = "123"
c = null
let ac:string = `ccc${a}`
expect(ac).toEqual("cccnull");
})
test("matchAll", () => {
// const reg = /t(e)(st(\d?))/g;
// const str = 'test1test2';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册