File tree 2 files changed +15
-3
lines changed
2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,10 @@ def test_frame_filtering_works_with_unexpanded_path_and_expanded_skip_path
122
122
2| Foo.new.bar
123
123
RUBY
124
124
125
+ if File . writable? ( pty_home_dir )
126
+ omit "Skip test with load files. Cannot create files in HOME directory."
127
+ end
128
+
125
129
debug_code ( program ) do
126
130
type "file = File.open('#{ pty_home_dir } /foo.rb', 'w+') { |f| f.write('#{ foo_file } ') }"
127
131
type 'c'
@@ -135,7 +139,9 @@ def test_frame_filtering_works_with_unexpanded_path_and_expanded_skip_path
135
139
type 'c'
136
140
end
137
141
ensure
138
- File . unlink "#{ pty_home_dir } /foo.rb"
142
+ if File . exist? "#{ pty_home_dir } /foo.rb"
143
+ File . unlink "#{ pty_home_dir } /foo.rb"
144
+ end
139
145
end
140
146
end
141
147
Original file line number Diff line number Diff line change @@ -97,11 +97,17 @@ def program
97
97
end
98
98
99
99
def with_rc_script
100
- File . open ( rc_filename , "w" ) { |f | f . write ( rc_script ) }
100
+ begin
101
+ File . open ( rc_filename , "w" ) { |f | f . write ( rc_script ) }
102
+ rescue Errno ::EPERM
103
+ omit "Skip test with rc files. Cannot create rcfiles in HOME directory."
104
+ end
101
105
102
106
yield
103
107
ensure
104
- File . delete ( rc_filename )
108
+ if File . exist? ( rc_filename )
109
+ File . delete ( rc_filename )
110
+ end
105
111
end
106
112
107
113
def test_debugger_loads_the_rc_file_by_default
You can’t perform that action at this time.
0 commit comments