Skip to content
Newer
Older
100644 34 lines (29 sloc) 1016 Bytes
801d098 Another test added which greps the source base for the eval function.
wade@bindshell.net authored Oct 20, 2011
1 #
2 # Copyright 2011 Wade Alcorn wade@bindshell.net
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 #
16 require 'test/unit'
17 require 'webrick'
18
19 class TC_Grep < Test::Unit::TestCase
20
21 def test_grep_eval
3fadfaf Patched bug in test/unit/tc_grep.rb
bcoles@gmail.com authored Nov 4, 2011
22 Dir['../../**/*.rb'].each do |path|
801d098 Another test added which greps the source base for the eval function.
wade@bindshell.net authored Oct 20, 2011
23 File.open( path ) do |f|
e340b2b change the eval grep unit tests to ignore the test file.
wade@bindshell.net authored Nov 4, 2011
24 next if /tc_grep.rb/.match(path) # skip this file
801d098 Another test added which greps the source base for the eval function.
wade@bindshell.net authored Oct 20, 2011
25 f.grep( /\Weval\W/im ) do |line|
26 assert(false, "Illegal use of 'eval' in framework: " + path + ':' + line)
27 end
28 end
29 end
30
31 end
32
33 end
Something went wrong with that request. Please try again.