#!inc/bin/testml-cpan

# Polymorphic == tests for str, num, bool:
Cat('foo', 'bar') == 'foobar'
  :"str == str"

Sum(11, 31) == 42
  :"num == num"

True == True
  :"bool == bool"

# Tests for =~ (regex match) variations
*text =~ *regex

# Tests for ~~ (has/contains str or substr) variations
*text ~~ *substr


=== Test 1: '{Got}' =~ {Want} -- string matches regex
--- text
I see pie
I see me
I see you

--- regex(/): I see

=== Test 2: '{Got}' =~ {Want}
--- ^text
--- ^regex(@/)

=== Test 3: '{Got}' =~ {Want}
--- ^text(@)
--- ^regex(/)

=== Test 4: '{Got}' =~ {Want}
--- ^text(@)
--- ^regex(@/)


# Has (~~) test blocks:
=== Test 5: '{Got}' ~~ '{Want}' -- string has substring
--- text
I see pie
I see me
I see you

--- substr(-)
pie
I see

=== Test 6: '{Got}' ~~ '{Want}'
--- ^text
--- substr(@): pie you

=== Test 7: '{Got}' ~~ '{Want}' -- list has string in it
--- ^text(@)
--- substr: I see me

=== Test 8: '{Got}' ~~ '{Want}'
--- ^text(@)
--- substr(@)
I see me
I see pie
