Skip Menu |

This queue is for tickets about the SuffixTree CPAN distribution.

Report information
The Basics
Id: 60010
Status: resolved
Worked: 1 hour (60 min)
Priority: 0/
Queue: SuffixTree

People
Owner: davido [...] cpan.org
Requestors: RURBAN [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.03
Fixed in: (no value)



Subject: [PATCH] test the features and bug RT#11243
Please add the attached test case and apply the patches for the 2 outstanding bugs. https://rt.cpan.org/Public/Bug/Display.html?id=11243 https://rt.cpan.org/Public/Bug/Display.html?id=11256 -- Reini Urban
Subject: test_string.t
#! perl use Test; BEGIN { plan tests => 6, todo => [6] } use SuffixTree; my $str = "mississippi is long river"; my $tree = create_tree($str); # print_tree($tree); ok (find_substring($tree, "ssis") == 3); ok (find_substring($tree, "pp") == 9); ok (find_substring($tree, "ss") == 3); ok (find_substring($tree, "ss") == 3); ok (find_substring($tree, "sss") > length($str)); # len + 10 actually # https://rt.cpan.org/Public/Bug/Display.html?id=11243 my $str2 = "x"; # this will redefine ST_ERROR and confuse suffex_tree.c: my $tree2 = create_tree($str2); $query = "Missouri river"; ok (find_substring($tree, $query) > length($str)); # TODO delete_tree($tree); delete_tree($tree2);
This has been resolved. An adaptation of your patches and test have been applied.