From 0c2532cdc3369a56e7760b7830545f26208dcb94 Mon Sep 17 00:00:00 2001 From: Bart van der Schoor Date: Fri, 31 Jan 2014 13:35:05 +0100 Subject: [PATCH] strip more headers from CLI tests --- test/modules/cli/fixtures/expected/help/help/stdout.txt | 3 --- test/modules/cli/fixtures/expected/query/async/stdout.txt | 3 --- test/modules/cli/src/CLI.ts | 5 ++--- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/test/modules/cli/fixtures/expected/help/help/stdout.txt b/test/modules/cli/fixtures/expected/help/help/stdout.txt index baa4022..48e6c4e 100644 --- a/test/modules/cli/fixtures/expected/help/help/stdout.txt +++ b/test/modules/cli/fixtures/expected/help/help/stdout.txt @@ -1,6 +1,3 @@ - ->> tsd 0.5.x (preview) - >> main query search definitions using globbing pattern diff --git a/test/modules/cli/fixtures/expected/query/async/stdout.txt b/test/modules/cli/fixtures/expected/query/async/stdout.txt index 0ec4194..a4aac3f 100644 --- a/test/modules/cli/fixtures/expected/query/async/stdout.txt +++ b/test/modules/cli/fixtures/expected/query/async/stdout.txt @@ -1,4 +1 @@ - ->> tsd 0.5.x (preview) - - async/async.d.ts : : 2013-12-18 02:56 diff --git a/test/modules/cli/src/CLI.ts b/test/modules/cli/src/CLI.ts index 723fe3d..7d31169 100644 --- a/test/modules/cli/src/CLI.ts +++ b/test/modules/cli/src/CLI.ts @@ -68,11 +68,10 @@ describe('CLI Query', () => { return args; } - var trimHeaderExp = /^[.\s]*?(-> tsd.*)\s+?-*\s*/; - var versionNumber = /(\d+-[a-z]+.\d+)/; + var trimHeaderExp = /^\s*?(>> tsd) (\d+\.\d+\.\d+)(\S+)?([ \S]+(?:\r?\n)+)/; function trimHeader(str:string):string { - return str.replace(trimHeaderExp, '').replace(versionNumber, 'x'); + return str.replace(trimHeaderExp, ''); } function assertCLIResult(result:xm.RunCLIResult, test, info:helper.TestInfo, args):void {