Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
130 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,39 @@ | ||
opal_filter "String" do | ||
fails "String#capitalize is locale insensitive (only upcases a-z and only downcases A-Z)" | ||
|
||
fails "String#center with length, padding raises an ArgumentError if padstr is empty" | ||
fails "String#center with length, padding raises a TypeError when padstr can't be converted to a string" | ||
fails "String#center with length, padding calls #to_str to convert padstr to a String" | ||
fails "String#center with length, padding raises a TypeError when length can't be converted to an integer" | ||
fails "String#center with length, padding calls #to_int to convert length to an integer" | ||
fails "String#center with length, padding pads with whitespace if no padstr is given" | ||
fails "String#center with length, padding returns a new string of specified length with self centered and padded with padstr" | ||
|
||
fails "String#lines should split on the default record separator and return enumerator if not block is given" | ||
fails "String#downcase is locale insensitive (only replaces A-Z)" | ||
|
||
fails "String#upcase is locale insensitive (only replaces a-z)" | ||
fails "String#size returns the length of self" | ||
fails "String#length returns the length of self" | ||
fails "String#end_with? converts its argument using :to_str" | ||
fails "String#end_with? returns true if other is empty" | ||
|
||
fails "String#index raises a TypeError if passed a Symbol" | ||
# we need regexp rewriting for these | ||
fails "String#index with Regexp supports \\G which matches at the given start offset" | ||
fails "String#index with Regexp starts the search at the given offset" | ||
fails "String#index with Regexp returns the index of the first match of regexp" | ||
|
||
fails "String#index raises a TypeError if passed a Symbol" | ||
|
||
fails "String#intern does not special case certain operators" | ||
fails "String#intern special cases +(binary) and -(binary)" | ||
fails "String#to_sym special cases +(binary) and -(binary)" | ||
|
||
fails "String#length returns the length of self" | ||
|
||
fails "String#lines should split on the default record separator and return enumerator if not block is given" | ||
|
||
fails "String#size returns the length of self" | ||
|
||
fails "String#start_with? ignores arguments not convertible to string" | ||
fails "String#start_with? converts its argument using :to_str" | ||
fails "String#end_with? converts its argument using :to_str" | ||
fails "String#end_with? returns true if other is empty" | ||
fails "String#downcase is locale insensitive (only replaces A-Z)" | ||
fails "String#intern does not special case certain operators" | ||
|
||
fails "String#to_sym does not special case certain operators" | ||
fails "String#capitalize is locale insensitive (only upcases a-z and only downcases A-Z)" | ||
fails "String#center with length, padding raises an ArgumentError if padstr is empty" | ||
fails "String#center with length, padding raises a TypeError when padstr can't be converted to a string" | ||
fails "String#center with length, padding calls #to_str to convert padstr to a String" | ||
fails "String#center with length, padding raises a TypeError when length can't be converted to an integer" | ||
fails "String#center with length, padding calls #to_int to convert length to an integer" | ||
fails "String#chomp when passed an Object raises a TypeError if #to_str does not return a String" | ||
fails "String#chomp when passed no argument returns a copy of the String when it is not modified" | ||
fails "String#to_sym special cases +(binary) and -(binary)" | ||
|
||
fails "String#upcase is locale insensitive (only replaces a-z)" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,91 @@ | ||
opal_filter 'tainted' do | ||
fails "Array#clear keeps tainted status" | ||
fails "Array#compact! keeps tainted status even if all elements are removed" | ||
fails "Array#delete_at keeps tainted status" | ||
fails "Array#delete_if keeps tainted status" | ||
fails "Array#delete keeps tainted status" | ||
fails "Array#shift passed a number n as an argument keeps taint status" | ||
fails "Array#shift passed a number n as an argument returns an untainted array even if the array is tainted" | ||
fails "Array#pop passed a number n as an argument keeps taint status" | ||
fails "Array#pop passed a number n as an argument returns an untainted array even if the array is tainted" | ||
fails "Array#pop keeps taint status" | ||
fails "Array#+ does not get infected even if an original array is tainted" | ||
fails "Kernel#to_s returns a tainted result if self is tainted" | ||
|
||
fails "Array#* with a string with a tainted separator taints the result if the array has two or more elements" | ||
fails "Array#* with a string with a tainted separator does not taint the result if the array has only one element" | ||
fails "Array#* with a string with a tainted separator does not taint the result if the array is empty" | ||
fails "Array#* with an integer copies the taint status of the original array if the passed count is not 0" | ||
fails "Array#* with an integer copies the taint status of the original array even if the array is empty" | ||
fails "Array#* with an integer copies the taint status of the original array even if the passed count is 0" | ||
fails "Array#compact does not keep tainted status even if all elements are removed" | ||
fails "Array#map! keeps tainted status" | ||
fails "Array#map does not copy tainted status" | ||
|
||
fails "Array#+ does not get infected even if an original array is tainted" | ||
|
||
fails "Array#clear keeps tainted status" | ||
|
||
fails "Array#clone copies taint status from the original" | ||
fails "Array#collect! keeps tainted status" | ||
|
||
fails "Array#collect does not copy tainted status" | ||
|
||
fails "Array#collect! keeps tainted status" | ||
|
||
fails "Array#compact does not keep tainted status even if all elements are removed" | ||
|
||
fails "Array#compact! keeps tainted status even if all elements are removed" | ||
|
||
fails "Array#concat keeps tainted status" | ||
fails "Array#concat keeps the tainted status of elements" | ||
|
||
fails "Array#delete keeps tainted status" | ||
|
||
fails "Array#delete_at keeps tainted status" | ||
|
||
fails "Array#delete_if keeps tainted status" | ||
|
||
fails "Array#dup copies taint status from the original" | ||
|
||
fails "Array#inspect taints the result if an element is tainted" | ||
fails "Array#inspect does not taint the result if the Array is tainted but empty" | ||
fails "Array#inspect taints the result if the Array is non-empty and tainted" | ||
fails "Array#to_s taints the result if an element is tainted" | ||
fails "Array#to_s does not taint the result if the Array is tainted but empty" | ||
fails "Array#to_s taints the result if the Array is non-empty and tainted" | ||
|
||
fails "Array#join with a tainted separator taints the result if the array has two or more elements" | ||
fails "Array#join with a tainted separator does not taint the result if the array has only one element" | ||
fails "Array#join with a tainted separator does not taint the result if the array is empty" | ||
fails "Array#join taints the result if the result of coercing an element is tainted" | ||
fails "Array#join does not taint the result if the Array is tainted but empty" | ||
fails "Array#join taints the result if the Array is tainted and non-empty" | ||
fails "Array#* with a string with a tainted separator taints the result if the array has two or more elements" | ||
fails "Array#* with a string with a tainted separator does not taint the result if the array has only one element" | ||
fails "Array#* with a string with a tainted separator does not taint the result if the array is empty" | ||
|
||
fails "Hash#reject taints the resulting hash" | ||
fails "Array#pop passed a number n as an argument keeps taint status" | ||
fails "Array#pop passed a number n as an argument returns an untainted array even if the array is tainted" | ||
fails "Array#pop keeps taint status" | ||
|
||
fails "Kernel#to_s returns a tainted result if self is tainted" | ||
fails "Array#map! keeps tainted status" | ||
fails "Array#map does not copy tainted status" | ||
|
||
fails "String#upcase taints result when self is tainted" | ||
fails "String#to_s taints the result when self is tainted" | ||
fails "String#to_str taints the result when self is tainted" | ||
fails "String#swapcase taints resulting string when self is tainted" | ||
fails "String#reverse taints the result if self is tainted" | ||
fails "Array#shift passed a number n as an argument keeps taint status" | ||
fails "Array#shift passed a number n as an argument returns an untainted array even if the array is tainted" | ||
|
||
fails "Array#to_s taints the result if an element is tainted" | ||
fails "Array#to_s does not taint the result if the Array is tainted but empty" | ||
fails "Array#to_s taints the result if the Array is non-empty and tainted" | ||
|
||
fails "Hash#reject taints the resulting hash" | ||
|
||
fails "Pathname.new is tainted if path is tainted" | ||
fails "String#downcase taints result when self is tainted" | ||
fails "String#capitalize taints resulting string when self is tainted" | ||
|
||
fails "String#downcase taints result when self is tainted" | ||
|
||
fails "String#center with length, padding when padding is tainted and self is untainted returns a tainted string if and only if length is longer than self" | ||
fails "String#center with length, padding taints result when self or padstr is tainted" | ||
|
||
fails "String#chomp when passed a String does not taint the result when the argument is tainted" | ||
fails "String#chomp when passed a String taints the result if self is tainted" | ||
fails "String#chomp when passed '\\n' taints the result if self is tainted" | ||
fails "String#chomp when passed '' taints the result if self is tainted" | ||
fails "String#chomp when passed nil taints the result if self is tainted" | ||
fails "String#chomp when passed nil returns a copy of the String" | ||
fails "String#chomp when passed no argument taints the result if self is tainted" | ||
|
||
fails "String#chop taints result when self is tainted" | ||
|
||
fails "String#reverse taints the result if self is tainted" | ||
|
||
fails "String#swapcase taints resulting string when self is tainted" | ||
|
||
fails "String#to_s taints the result when self is tainted" | ||
|
||
fails "String#to_str taints the result when self is tainted" | ||
|
||
fails "String#upcase taints result when self is tainted" | ||
|
||
fails "Pathname.new is tainted if path is tainted" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,61 @@ | ||
opal_filter "Object#trusted/untrusted" do | ||
fails "Array#pop passed a number n as an argument keeps untrusted status" | ||
fails "Array#pop passed a number n as an argument returns a trusted array even if the array is untrusted" | ||
fails "Array#pop keeps untrusted status" | ||
fails "Kernel#to_s returns an untrusted result if self is untrusted" | ||
|
||
fails "Array#+ does not infected even if an original array is untrusted" | ||
|
||
fails "Array#* with an integer copies the untrusted status of the original array if the passed count is not 0" | ||
fails "Array#* with an integer copies the untrusted status of the original array even if the array is empty" | ||
fails "Array#* with an integer copies the untrusted status of the original array even if the passed count is 0" | ||
fails "Array#* with a string with an untrusted separator untrusts the result if the array has two or more elements" | ||
fails "Array#* with a string with an untrusted separator does not untrust the result if the array has only one element" | ||
fails "Array#* with a string with an untrusted separator does not untrust the result if the array is empty" | ||
|
||
fails "Array#delete keeps untrusted status" | ||
|
||
fails "Array#delete_if keeps untrusted status" | ||
|
||
fails "Array#delete_at keeps untrusted status" | ||
fails "Array#compact! keeps untrusted status even if all elements are removed" | ||
fails "Array#compact does not keep untrusted status even if all elements are removed" | ||
|
||
fails "Array#clear keeps untrusted status" | ||
fails "Array#map does not copy untrusted status" | ||
|
||
fails "Array#clone copies untrusted status from the original" | ||
fails "Array#collect! keeps untrusted status" | ||
|
||
fails "Array#collect does not copy untrusted status" | ||
|
||
fails "Array#compact does not keep untrusted status even if all elements are removed" | ||
|
||
fails "Array#compact! keeps untrusted status even if all elements are removed" | ||
|
||
fails "Array#collect! keeps untrusted status" | ||
|
||
fails "Array#concat keeps untrusted status" | ||
fails "Array#concat is not infected untrustedness by the other" | ||
fails "Array#concat keeps the untrusted status of elements" | ||
|
||
fails "Array#dup copies untrusted status from the original" | ||
fails "Array#map! keeps untrusted status" | ||
|
||
fails "Array#inspect untrusts the result if an element is untrusted" | ||
fails "Array#inspect does not untrust the result if the Array is untrusted but empty" | ||
fails "Array#inspect untrusts the result if the Array is untrusted" | ||
fails "Array#to_s untrusts the result if an element is untrusted" | ||
fails "Array#to_s does not untrust the result if the Array is untrusted but empty" | ||
fails "Array#to_s untrusts the result if the Array is untrusted" | ||
|
||
fails "Array#join with an untrusted separator untrusts the result if the array has two or more elements" | ||
fails "Array#join with an untrusted separator does not untrust the result if the array has only one element" | ||
fails "Array#join with an untrusted separator does not untrust the result if the array is empty" | ||
fails "Array#join untrusts the result if the result of coercing an element is untrusted" | ||
fails "Array#join does not untrust the result if the Array is untrusted but empty" | ||
fails "Array#join untrusts the result if the Array is untrusted and non-empty" | ||
fails "Array#* with a string with an untrusted separator untrusts the result if the array has two or more elements" | ||
fails "Array#* with a string with an untrusted separator does not untrust the result if the array has only one element" | ||
fails "Array#* with a string with an untrusted separator does not untrust the result if the array is empty" | ||
|
||
fails "Kernel#to_s returns an untrusted result if self is untrusted" | ||
fails "Array#map does not copy untrusted status" | ||
|
||
fails "Array#pop passed a number n as an argument keeps untrusted status" | ||
fails "Array#pop passed a number n as an argument returns a trusted array even if the array is untrusted" | ||
fails "Array#pop keeps untrusted status" | ||
|
||
fails "Array#map! keeps untrusted status" | ||
|
||
fails "Array#to_s untrusts the result if an element is untrusted" | ||
fails "Array#to_s does not untrust the result if the Array is untrusted but empty" | ||
fails "Array#to_s untrusts the result if the Array is untrusted" | ||
|
||
fails "String#chop untrusts result when self is untrusted" | ||
end |