diff --git a/snippets/snippets.json b/snippets/snippets.json index c42c200..7c79d91 100644 --- a/snippets/snippets.json +++ b/snippets/snippets.json @@ -196,7 +196,7 @@ "incomplete_code": "if true", "complete_code": "x = 1;", "syntax_error": "1 +", - "input_prompt": "% Octave stdin doesn't support Jupyter input protocol", + "input_prompt": "name = input(\"Enter: \")", "sleep_code": "pause(2)", "completion_var": "test_variable_for_completion", "completion_setup": "test_variable_for_completion = 42;", diff --git a/src/tests.rs b/src/tests.rs index 5ea7dc7..f68508a 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -701,7 +701,11 @@ fn test_stdin_input_request( return TestResult::Unsupported; } - let mock_input = "test_input_42"; + // Mock input includes quotes to ensure validity in languages like + // GNU Octave, where unquoted undefined variables (e.g. `test_input_42`) + // would cause a kernel error. + // TODO: Make mock input language-dependent for robustness. + let mock_input = "\"test_input_42\""; match kernel.execute_with_stdin(&code, mock_input).await { Ok((reply, _iopub, received_input_request)) => {