on master help sign in
-
9f93852coreyoconnor
test/interactive_terminal_test.hs+19
@@ -158,6 +158,7 @@ all_tests
158 , attributes_test_4
158 , attributes_test_4
159 , attributes_test_5
159 , attributes_test_5
160 , inline_test_0
160 , inline_test_0
161+ , inline_test_1
161 ]
162 ]
162
163
163reserve_output_test = Test
164reserve_output_test = Test
@@ -867,3 +868,21 @@ The third line "line 3" should be drawn in the same style as the first line.
867
868
868 , confirm_results = generic_output_match_confirm
869 , confirm_results = generic_output_match_confirm
869 }
870 }
871+
872+inline_test_1 = Test
873+ { test_name = "Verify styled output can be performed without clearing the screen."
874+ , test_ID = "inline_test_1"
875+ , test_action = do
876+ t <- terminal_handle
877+ putStr "Not styled. "
878+ put_attr_change t $ back_color red >> apply_style underline
879+ putStr " Styled! "
880+ put_default_attr t
881+ putStrLn "Not styled."
882+ release_terminal t
883+ return ()
884+ , print_summary = putStr $ [$heredoc|
885+|]
886+
887+ , confirm_results = generic_output_match_confirm
888+ }