File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -166,12 +166,12 @@ mod e2e_test {
166166 }
167167
168168 #[ test]
169- fn test_empty_line ( ) {
169+ fn test_empty_line_and_dollar_question_mark ( ) {
170170 let project_root = find_project_root ( ) ;
171171 println ! ( "Setting current directory to: {:?}" , project_root) ;
172172 std:: env:: set_current_dir ( & project_root) . unwrap ( ) ;
173173 let mut session = spawn (
174- & build_command ( & [ "plugin_greet .wasm" ] , "repl_logic_guest.wasm" ) ,
174+ & build_command ( & [ "plugin_echo .wasm" ] , "repl_logic_guest.wasm" ) ,
175175 Some ( TEST_TIMEOUT ) ,
176176 )
177177 . expect ( "Can't launch pluginlab with plugin greet" ) ;
@@ -205,6 +205,18 @@ mod e2e_test {
205205 session
206206 . exp_string ( "repl(1)>" )
207207 . expect ( "Empty command should lead to a new prompt, without changing $?" ) ;
208+ session
209+ . send_line ( "echo $?" )
210+ . expect ( "Failed to send command" ) ;
211+ session
212+ . exp_string ( "1" )
213+ . expect ( "Didn't get expected echo output for $? after previous command failed" ) ;
214+ session
215+ . send_line ( "echo $?" )
216+ . expect ( "Failed to send command" ) ;
217+ session
218+ . exp_string ( "0" )
219+ . expect ( "Didn't get expected echo output for $? after previous command succeeded" ) ;
208220 }
209221
210222 #[ test]
You can’t perform that action at this time.
0 commit comments