From 42d8328b0c1962e4b21e7a04ba7e7e0c6b5b5627 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 3 Aug 2015 13:31:56 -0700 Subject: [PATCH] Add testcase for #4101 --- tests/baselines/reference/exportClauseEmit.js | 16 ++++++++++++++++ .../baselines/reference/exportClauseEmit.symbols | 11 +++++++++++ tests/baselines/reference/exportClauseEmit.types | 14 ++++++++++++++ tests/cases/compiler/exportClauseEmit.ts | 6 ++++++ 4 files changed, 47 insertions(+) create mode 100644 tests/baselines/reference/exportClauseEmit.js create mode 100644 tests/baselines/reference/exportClauseEmit.symbols create mode 100644 tests/baselines/reference/exportClauseEmit.types create mode 100644 tests/cases/compiler/exportClauseEmit.ts diff --git a/tests/baselines/reference/exportClauseEmit.js b/tests/baselines/reference/exportClauseEmit.js new file mode 100644 index 0000000000000..f516efc84795a --- /dev/null +++ b/tests/baselines/reference/exportClauseEmit.js @@ -0,0 +1,16 @@ +//// [exportClauseEmit.ts] +var str = "Hello"; +// Change str +str = "Hello World!!!"; +export {str}; + +//// [exportClauseEmit.js] +var str = "Hello"; +exports.str = str; +// Change str +str = "Hello World!!!"; + + +//// [exportClauseEmit.d.ts] +declare var str: string; +export { str }; diff --git a/tests/baselines/reference/exportClauseEmit.symbols b/tests/baselines/reference/exportClauseEmit.symbols new file mode 100644 index 0000000000000..83176a581c49c --- /dev/null +++ b/tests/baselines/reference/exportClauseEmit.symbols @@ -0,0 +1,11 @@ +=== tests/cases/compiler/exportClauseEmit.ts === +var str = "Hello"; +>str : Symbol(str, Decl(exportClauseEmit.ts, 0, 3)) + +// Change str +str = "Hello World!!!"; +>str : Symbol(str, Decl(exportClauseEmit.ts, 0, 3)) + +export {str}; +>str : Symbol(str, Decl(exportClauseEmit.ts, 3, 8)) + diff --git a/tests/baselines/reference/exportClauseEmit.types b/tests/baselines/reference/exportClauseEmit.types new file mode 100644 index 0000000000000..96646adbecca6 --- /dev/null +++ b/tests/baselines/reference/exportClauseEmit.types @@ -0,0 +1,14 @@ +=== tests/cases/compiler/exportClauseEmit.ts === +var str = "Hello"; +>str : string +>"Hello" : string + +// Change str +str = "Hello World!!!"; +>str = "Hello World!!!" : string +>str : string +>"Hello World!!!" : string + +export {str}; +>str : string + diff --git a/tests/cases/compiler/exportClauseEmit.ts b/tests/cases/compiler/exportClauseEmit.ts new file mode 100644 index 0000000000000..237209a6e6cfc --- /dev/null +++ b/tests/cases/compiler/exportClauseEmit.ts @@ -0,0 +1,6 @@ +//@module: commonjs +//@declaration: true +var str = "Hello"; +// Change str +str = "Hello World!!!"; +export {str}; \ No newline at end of file