@@ -231,4 +231,58 @@ describe('test/commands/dev.test.ts', () => {
231231 . expect ( 'code' , 0 )
232232 . end ( ) ;
233233 } ) ;
234+
235+ describe ( 'work on special path' , ( ) => {
236+ it ( 'should work with space in path' , ( ) => {
237+ return coffee . fork ( eggBin , [ 'dev' ] , {
238+ cwd : getFixtures ( 'test path with space/example-app' ) ,
239+ } )
240+ // .debug()
241+ . expect ( 'stdout' , / H e l l o , w o r l d ! / )
242+ . expect ( 'code' , 0 )
243+ . end ( ) ;
244+ } ) ;
245+
246+ it ( 'should support declarations with space in path' , ( ) => {
247+ return coffee . fork ( eggBin , [ 'dev' ] , {
248+ cwd : getFixtures ( 'test path with space/example-declarations' ) ,
249+ } )
250+ // .debug()
251+ . expect ( 'stdout' , / H i , I a m E g g T S h e l p e r ! / )
252+ . expect ( 'code' , 0 )
253+ . end ( ) ;
254+ } ) ;
255+
256+ it ( 'should support egg.require with space in path' , ( ) => {
257+ return coffee . fork ( eggBin , [ 'dev' ] , {
258+ cwd : getFixtures ( 'test path with space/example-egg-require' ) ,
259+ } )
260+ // .debug()
261+ . expect ( 'stdout' , / h e y , y o u r e q u i r e m e b y - - r e q u i r e / )
262+ . expect ( 'code' , 0 )
263+ . end ( ) ;
264+ } ) ;
265+
266+ it ( 'should support --require with space in path' , ( ) => {
267+ return coffee . fork ( eggBin , [ 'dev' , '--require' , getFixtures ( 'test path with space/require script.cjs' ) ] , {
268+ cwd : getFixtures ( 'test path with space/example-require-script' ) ,
269+ } )
270+ // .debug()
271+ . expect ( 'stdout' , / h e y , y o u r e q u i r e m e b y - - r e q u i r e / )
272+ . expect ( 'code' , 0 )
273+ . end ( ) ;
274+ } ) ;
275+
276+ it ( 'should support --import with space in path' , ( ) => {
277+ return coffee . fork ( eggBin , [ 'dev' , '--import' , getFixtures ( 'test path with space/require script.mjs' ) ] , {
278+ cwd : getFixtures ( 'test path with space/example-import-script' ) ,
279+ } )
280+ // .debug()
281+ . expect ( 'stdout' , / h e y , y o u r e q u i r e m e b y - - i m p o r t / )
282+ . expect ( 'code' , 0 )
283+ . end ( ) ;
284+ } ) ;
285+
286+ } ) ;
287+
234288} ) ;
0 commit comments