2024-03-09 23:40:42 +01:00
|
|
|
require_relative "../setup"
|
|
|
|
module BSD::Control
|
|
|
|
class DisableFeatureTest < Test::Unit::TestCase
|
|
|
|
require 'fileutils'
|
|
|
|
include FileUtils
|
|
|
|
|
2024-03-20 20:25:20 +01:00
|
|
|
def test_disable_pageexec_nonexistent_file
|
2024-03-09 23:40:42 +01:00
|
|
|
assert_raises(Errno::ENOENT) do
|
2024-03-20 20:25:20 +01:00
|
|
|
BSD::Control.feature(:pageexec).disable!(file)
|
2024-03-09 23:40:42 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def file
|
|
|
|
File.join(__dir__, "file")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|