diff --git a/uni_modules/uts-tests/utssdk/String.uts b/uni_modules/uts-tests/utssdk/String.uts index e433dd790cf217bb14334716de67bbe67cbf4af9..73112605f74c7d848f926a759e180c6c0bd6235d 100644 --- a/uni_modules/uts-tests/utssdk/String.uts +++ b/uni_modules/uts-tests/utssdk/String.uts @@ -206,6 +206,10 @@ export function testString(): Result { expect(str6).toEqual("The morning is upon us."); expect("".slice()).toEqual(""); + + expect("abcdefg".slice(-1)).toEqual("g"); + expect("abcdefg".slice(-1,-2)).toEqual(""); + }) test('split', () => { const str = 'The quick brown fox jumps over the lazy dog.';