File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 7777 @test abc == abc[1 : 3 ]
7878 @test abc[1 : 3 ] == " abc"
7979 free (abc)
80+
81+ # Test other convenience functions
82+ str = m " foobarbaz"
83+ @test contains (str, c " foo" )
84+ @test contains (str, c " bar" )
85+ @test contains (str, c " baz" )
86+ @test startswith (str, c " foo" )
87+ @test ! startswith (c " foo" , str)
88+ @test ! startswith (str, c " g" )
89+ @test endswith (str, c " baz" )
90+ @test ! endswith (str, c " bar" )
91+ free (str)
Original file line number Diff line number Diff line change 6767 @test ! startswith (str, c " g" )
6868 @test isvalid (c " foo" , 1 )
6969 @test ! isvalid (c " foo" , 9999 )
70- @test endswith (c " foobar " , c "bar " )
71- @test ! endswith (c " foobar " , c "baz " )
70+ @test endswith (str , c "baz " )
71+ @test ! endswith (str , c "bar " )
7272 @test isvalid (c " α" , 1 )
7373 @test ! isvalid (c " α" , 2 )
7474 @test thisind (c " α" , 2 ) == 1
You can’t perform that action at this time.
0 commit comments