From 46b5cc3d7ac2f6e7df96f03716baabff5d97d290 Mon Sep 17 00:00:00 2001 From: m0_75226990 Date: Sat, 22 Jul 2023 15:53:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=20sting.substring=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uni_modules/uts-tests/utssdk/String.uts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/uni_modules/uts-tests/utssdk/String.uts b/uni_modules/uts-tests/utssdk/String.uts index 8bb71d2..80c88e1 100644 --- a/uni_modules/uts-tests/utssdk/String.uts +++ b/uni_modules/uts-tests/utssdk/String.uts @@ -275,6 +275,9 @@ export function testString(): Result { expect(str2.substring(3, 8)).toEqual("lo wo"); expect(str2.substring(0, -1)).toEqual(""); expect(str2.substring(0, 20)).toEqual("hello world"); + + var str3 = "aaa"; + expect(str3.substring(10, 1)).toEqual("aa"); }) test("trim", () => { const greeting = ' Hello world! '; -- GitLab