Change TERM when running tests with input
commit0d14e585fd493914fa43b123cad590d637c5dc03
authorMike Magruder <mikemag@fb.com>
Mon, 1 Jul 2013 18:47:55 +0000 (1 11:47 -0700)
committerSara Golemon <sgolemon@fb.com>
Tue, 2 Jul 2013 18:46:21 +0000 (2 11:46 -0700)
tree0864117b95dc8989e8b871b66dbbb77d677a559f
parent556b4ac04f345d538eda7cc7d9c5ddace0464af1
Change TERM when running tests with input

In general, a test which gets its input piped in is not really interacting with a terminal like it normally would. Thus, letting it think it has the same terminal as the environment is incorrect. More specifically, hphpd uses Readline, which inspects the TERM env var and based on that and a stunning array of other options will attempt to initialize the terminal with extra control characters on first use. It would be tough to try to control for all of the different options and ensure they're all the same, and honestly testing Readline is not the objective of our tests anyway. Thus, I'm forcing TERM to 'dumb' when a test has input to ensure a) a simple terminal which requires no control characters and b) consistency no matter what environment is present when the tests are run.
22 files changed:
hphp/test/quick/debugger/break1.php.expectf
hphp/test/quick/debugger/break2.php.expectf
hphp/test/quick/debugger/break3.php.expectf
hphp/test/quick/debugger/break4.php.expectf
hphp/test/quick/debugger/error_bad_cmd_type_receive.php.expectf
hphp/test/quick/debugger/error_bad_cmd_type_send.php.expectf
hphp/test/quick/debugger/error_short_cmd_receive.php.expectf
hphp/test/quick/debugger/error_short_cmd_send.php.expectf
hphp/test/quick/debugger/eval1.php.expectf
hphp/test/quick/debugger/exception1.php.expectf
hphp/test/quick/debugger/flow.php.expectf
hphp/test/quick/debugger/flow2.php.expectf
hphp/test/quick/debugger/flow_excep.php.expectf
hphp/test/quick/debugger/flow_gen.php.expectf
hphp/test/quick/debugger/flow_gen_excep.php.expectf
hphp/test/quick/debugger/flow_multistep.php.expectf
hphp/test/quick/debugger/flow_small.php.expectf
hphp/test/quick/debugger/info1.php.expectf
hphp/test/quick/debugger/list.php.expectf
hphp/test/quick/debugger/printThis.php.expectf
hphp/test/quick/debugger/stack1.php.expectf
hphp/test/run