From 801b7a5729d0f910f1355049d81e4c95e98bcf80 Mon Sep 17 00:00:00 2001 From: Cotton Hou Date: Fri, 11 Nov 2016 03:37:46 +0800 Subject: [PATCH] add test cases for es2017.string --- tests/cases/conformance/es2017/useStringPadding1.ts | 7 +++++++ tests/cases/conformance/es2017/useStringPadding2.ts | 7 +++++++ tests/cases/conformance/es2017/useStringPadding3.ts | 7 +++++++ tests/cases/conformance/es2017/useStringPadding4.ts | 7 +++++++ 4 files changed, 28 insertions(+) create mode 100644 tests/cases/conformance/es2017/useStringPadding1.ts create mode 100644 tests/cases/conformance/es2017/useStringPadding2.ts create mode 100644 tests/cases/conformance/es2017/useStringPadding3.ts create mode 100644 tests/cases/conformance/es2017/useStringPadding4.ts diff --git a/tests/cases/conformance/es2017/useStringPadding1.ts b/tests/cases/conformance/es2017/useStringPadding1.ts new file mode 100644 index 0000000000000..42a04fc4e62bf --- /dev/null +++ b/tests/cases/conformance/es2017/useStringPadding1.ts @@ -0,0 +1,7 @@ +// @target: es5 +// @lib: es5,es2017.string + +var str = 'foo'; + +str.padStart(5, '-'); +str.padEnd(5, '-'); diff --git a/tests/cases/conformance/es2017/useStringPadding2.ts b/tests/cases/conformance/es2017/useStringPadding2.ts new file mode 100644 index 0000000000000..98a3c0b90b3c0 --- /dev/null +++ b/tests/cases/conformance/es2017/useStringPadding2.ts @@ -0,0 +1,7 @@ +// @target: es5 +// @lib: es5 + +var str = 'foo'; + +str.padStart(5, '-'); +str.padEnd(5, '-'); diff --git a/tests/cases/conformance/es2017/useStringPadding3.ts b/tests/cases/conformance/es2017/useStringPadding3.ts new file mode 100644 index 0000000000000..d5a1a3982ba53 --- /dev/null +++ b/tests/cases/conformance/es2017/useStringPadding3.ts @@ -0,0 +1,7 @@ +// @target: es6 +// + +var str = 'foo'; + +str.padStart(5, '-'); +str.padEnd(5, '-'); diff --git a/tests/cases/conformance/es2017/useStringPadding4.ts b/tests/cases/conformance/es2017/useStringPadding4.ts new file mode 100644 index 0000000000000..d55cdac11ac5e --- /dev/null +++ b/tests/cases/conformance/es2017/useStringPadding4.ts @@ -0,0 +1,7 @@ +// @target: es6 +// @lib: es2017 + +var str = 'foo'; + +str.padStart(5, '-'); +str.padEnd(5, '-');