on master help sign in
prototype interface for inline image output
a1cae01coreyoconnor
test/interactive_terminal_test.hs+19
@@ -156,6 +156,7 @@ all_tests
156 , attributes_test_3
156 , attributes_test_3
157 , attributes_test_4
157 , attributes_test_4
158 , attributes_test_5
158 , attributes_test_5
159+ , inline_test_0
159 ]
160 ]
160
161
161reserve_output_test = Test
162reserve_output_test = Test
@@ -845,3 +846,21 @@ Did the test output match the description?
845 default_success_confirm_results
846 default_success_confirm_results
846 }
847 }
847
848
849+inline_test_0 = Test
850+ { test_name = "Verify styled output can be performed without clearing the screen."
851+ , test_ID = "inline_test_0"
852+ , test_action = do
853+ t <- terminal_handle
854+ d <- display_bounds t >>= display_context t
855+ let image = string ( def_attr `with_back_color` red ) "line 1."
856+ putStrLn "line 0."
857+ put_image_ln d image
858+ putStrLn "line 2."
859+ release_terminal t
860+ return ()
861+ , print_summary = putStr $ [$heredoc|
862+lines are in order.
863+|]
864+
865+ , confirm_results = generic_output_match_confirm
866+ }