File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
test/reline/yamatanooroti Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change 55
66 class Reline ::TestRendering < Yamatanooroti ::TestCase
77 def setup
8+ @pwd = Dir . pwd
9+ @tmpdir = File . join ( Dir . tmpdir , "test_reline_config_#{ $$} " )
10+ begin
11+ Dir . mkdir ( @tmpdir )
12+ rescue Errno ::EEXIST
13+ FileUtils . rm_rf ( @tmpdir )
14+ Dir . mkdir ( @tmpdir )
15+ end
16+ Dir . chdir ( @tmpdir )
817 inputrc_backup = ENV [ 'INPUTRC' ]
9- ENV [ 'INPUTRC' ] = 'nonexistent_file'
10- start_terminal ( 5 , 30 , %w{ ruby -Ilib bin/multiline_repl } )
18+ @inputrc_file = ENV [ 'INPUTRC' ] = File . expand_path ( 'temporaty_inputrc' )
19+ File . unlink ( @inputrc_file ) if File . exist? ( @inputrc_file )
20+ start_terminal ( 5 , 30 , %W{ ruby -I#{ @pwd } /lib #{ @pwd } /bin/multiline_repl} )
1121 sleep 0.5
1222 ENV [ 'INPUTRC' ] = inputrc_backup
1323 end
1424
25+ def teardown
26+ Dir . chdir ( @pwd )
27+ FileUtils . rm_rf ( @tmpdir )
28+ end
29+
1530 def test_history_back
1631 write ( ":a\n " )
1732 write ( "\C -p" )
You can’t perform that action at this time.
0 commit comments