From fa3c636494bfb5ec3f853f15421f9a005205fa22 Mon Sep 17 00:00:00 2001 From: Corey Johnson & Kevin Sawicki Date: Wed, 29 May 2013 14:57:33 -0700 Subject: [PATCH] Doc test flag --- src/atom-application.coffee | 5 ++--- src/main.coffee | 5 +++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/atom-application.coffee b/src/atom-application.coffee index 14908a249..bb8dce0a9 100644 --- a/src/atom-application.coffee +++ b/src/atom-application.coffee @@ -15,11 +15,10 @@ class AtomApplication menu: null resourcePath: null pathsToOpen: null - testMode: null version: null socketPath: '/tmp/atom.sock' - constructor: ({@resourcePath, @pathsToOpen, @testMode, @version, pidToKillWhenClosed}) -> + constructor: ({@resourcePath, @pathsToOpen, @version, test, pidToKillWhenClosed}) -> @pidsToOpenWindows = {} @pathsToOpen ?= [null] @windows = [] @@ -32,7 +31,7 @@ class AtomApplication @buildApplicationMenu() @handleEvents() - if @testMode + if test @runSpecs(true) else @openPaths(@pathsToOpen, pidToKillWhenClosed) diff --git a/src/main.coffee b/src/main.coffee index e1fab163b..0f1359348 100644 --- a/src/main.coffee +++ b/src/main.coffee @@ -28,6 +28,7 @@ parseCommandLine = -> """ options.alias('d', 'dev').boolean('d').describe('d', 'Run in development mode.') options.alias('h', 'help').boolean('h').describe('h', 'Print this usage message.') + options.alias('t', 'test').boolean('t').describe('t', 'Run the Atom specs and exit with error code on failures.') options.alias('w', 'wait').boolean('w').describe('w', 'Wait for window to be closed before returning.') args = options.argv if args.h @@ -39,7 +40,7 @@ parseCommandLine = -> pathsToOpen ?= [executedFrom] if executedFrom pathsToOpen = pathsToOpen.map (pathToOpen) -> path.resolve(executedFrom ? process.cwd(), pathToOpen) - testMode = true if args['test'] + test = args['test'] pidToKillWhenClosed = args['pid'] if args['wait'] if args['resource-path'] @@ -52,4 +53,4 @@ parseCommandLine = -> catch e resourcePath = path.dirname(__dirname) - {resourcePath, executedFrom, pathsToOpen, testMode, version, pidToKillWhenClosed} + {resourcePath, pathsToOpen, test, version, pidToKillWhenClosed}