Skip to content
This repository has been archived by the owner on Apr 30, 2019. It is now read-only.

Commit

Permalink
strip more headers from CLI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Bartvds committed Jan 31, 2014
1 parent 32b6f60 commit 0c2532c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
3 changes: 0 additions & 3 deletions test/modules/cli/fixtures/expected/help/help/stdout.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@

>> tsd 0.5.x (preview)

>> main

query <pattern> search definitions using globbing pattern
Expand Down
3 changes: 0 additions & 3 deletions test/modules/cli/fixtures/expected/query/async/stdout.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@

>> tsd 0.5.x (preview)

- async/async.d.ts : <head> : 2013-12-18 02:56
5 changes: 2 additions & 3 deletions test/modules/cli/src/CLI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 0c2532c

Please sign in to comment.