@@ -5659,6 +5659,7 @@ def test_program_arg_separator(self):
56595659
56605660 def test_emrun (self ):
56615661 self .emcc ('test_emrun.c' , ['--emrun' , '-o' , 'test_emrun.html' ])
5662+ self .emcc ('test_interactive_emrun.c' , ['--emrun' , '-pthread' , '-sPROXY_TO_PTHREAD' , '-sEXIT_RUNTIME' , '-o' , 'test_interactive_emrun.html' ])
56625663 if not has_browser ():
56635664 self .skipTest ('need a browser' )
56645665
@@ -5697,6 +5698,7 @@ def test_emrun(self):
56975698 ['--private_browsing' , '--port' , '6941' ],
56985699 ['--dump_out_directory' , 'other dir/multiple' , '--port' , '6942' ],
56995700 ['--dump_out_directory=foo_bar' , '--port' , '6942' ],
5701+ ['--interactive' ],
57005702 ]:
57015703 args = args_base + args + [self .in_dir ('test_emrun.html' ), '--' , '1' , '2' , '--3' , 'escaped space' , 'with_underscore' ]
57025704 print (shlex .join (args ))
@@ -5721,6 +5723,12 @@ def test_emrun(self):
57215723 self .assertContained ('Testing char sequences: %20%21 ä' , stdout )
57225724 self .assertContained ('hello, error stream!' , stderr )
57235725
5726+ args = args_base + ['--interactive' , self .in_dir ('test_interactive_emrun.html' )]
5727+ print (shlex .join (args ))
5728+ proc = self .run_process (args , check = False , input = "hello" )
5729+ self .assertEqual (proc .returncode , 100 )
5730+ self .assertContained ('hello' , stdout )
5731+
57245732
57255733class browser64 (browser ):
57265734 def setUp (self ):
0 commit comments