[PATCH] For build bustage in text-massager-test.cc

walt <[email protected]>
Newsgroups gmane.comp.gnome.apps.pan.devel
Message-ID <[email protected]>
Cheers to K.Haley :)

commit 63130f9afe2d915c6ffe4406f93bdbc302d8e606
Author: K. Haley <[email protected]>
Date:   Sat May 15 00:49:38 2010 -0600

     Guess deliberate line breaks

This commit caused some build breakage in text-massager-test.cc, and I got
past it with the attached patch.

Note: I don't claim that I fixed anything, just that pan compiles now ;)

Posting patches with thunderbird/mozilla has long had its problems, but I
read somewhere that setting thunderbird's linewrap to zero characters will
fix everything.

I've done that, and this post will test that claim :)

_______________________________________________
Pan-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/pan-devel
pan.patch (text/x-diff, 4.6 KB)
diff --git a/pan/usenet-utils/text-massager-test.cc b/pan/usenet-utils/text-massager-test.cc
index 6043383..522e57b 100644
--- a/pan/usenet-utils/text-massager-test.cc
+++ b/pan/usenet-utils/text-massager-test.cc
@@ -271,77 +271,77 @@ int main (void)
    const char *in2, *sep="_";
    in2 = "prefix - one ...__   - two - three";
    expected_out = "prefix_one_two_three";
-   out = pan::subject_to_path(in2, sep);
+   out = pan::subject_to_path(in2, 1, sep);
    //std::cout<<"input: '"<<in2<<"'\noutput: '"<<out<<"'\n"<<std::endl;
    check(out == expected_out);
    in2 = "prefix File 25 of 1000 one Post 1 _ 25: two file 1_10 end";
    expected_out = "prefix_one_two_end";
-   out = pan::subject_to_path(in2, sep);
+   out = pan::subject_to_path(in2, 1, sep);
    //std::cout<<"input: '"<<in2<<"'\noutput: '"<<out<<"'\n"<<std::endl;
    check(out == expected_out);
    in2 = "prefix [1 of 10] middle (2 / 20) end";
    expected_out = "prefix_middle_end";
-   out = pan::subject_to_path(in2, sep);
+   out = pan::subject_to_path(in2, 1, sep);
    //std::cout<<"input: '"<<in2<<"'\noutput: '"<<out<<"'\n"<<std::endl;
    check(out == expected_out);
    in2 = "prefix \" file name here\" yEnc ending";
    expected_out = "prefix";
-   out = pan::subject_to_path(in2, sep);
+   out = pan::subject_to_path(in2, 1, sep);
    //std::cout<<"input: '"<<in2<<"'\noutput: '"<<out<<"'\n"<<std::endl;
    check(out == expected_out);
    in2 = "prefix file name here yEnc ending";
    expected_out = "prefix_file_name";
-   out = pan::subject_to_path(in2, sep);
+   out = pan::subject_to_path(in2, 1, sep);
    //std::cout<<"input: '"<<in2<<"'\noutput: '"<<out<<"'\n"<<std::endl;
    check(out == expected_out);
    in2 = "prefix \"stuff \"\" file name here.sdf\" bar baz.gd ending";
    expected_out = "prefix_stuff_bar_ending";
-   out = pan::subject_to_path(in2, sep);
+   out = pan::subject_to_path(in2, 1, sep);
    //std::cout<<"input: '"<<in2<<"'\noutput: '"<<out<<"'\n"<<std::endl;
    check(out == expected_out);
    in2 = "prefix 2Kb one 3kB two 10 KB three 100 Bytes four [5 KB] end \t";
    expected_out = "prefix_one_two_three_four_end";
-   out = pan::subject_to_path(in2, sep);
+   out = pan::subject_to_path(in2, 1, sep);
    //std::cout<<"input: '"<<in2<<"'\noutput: '"<<out<<"'\n"<<std::endl;
    check(out == expected_out);
    in2 = "prefix / a \\ b < c > d | e * f ? g ' h \" end";
    expected_out = "prefix_a_b_c_d_e_f_g_h_end";
-   out = pan::subject_to_path(in2, sep);
+   out = pan::subject_to_path(in2, 1, sep);
    //std::cout<<"input: '"<<in2<<"'\noutput: '"<<out<<"'\n"<<std::endl;
    check(out == expected_out);
    in2 = "[foo]     K's    \"kpsh eg02b.jpg\" (0/2) 685k bar ";
    expected_out = "[foo]_K_s_bar";
-   out = pan::subject_to_path(in2, sep);
+   out = pan::subject_to_path(in2, 1, sep);
    //std::cout<<"input: '"<<in2<<"'\noutput: '"<<out<<"'\n"<<std::endl;
    check(out == expected_out);
    in2 = "[ASDF-FDSE]  Name1 & Name2 - Spettertje - 01 title here  (thx AntA)  Post 6_6 - File 9_9 - aaspettertje01.sfv (1/1)";
    expected_out = "[ASDF-FDSE]_Name1_&_Name2_Spettertje_01_title_here_(thx_AntA)";
-   out = pan::subject_to_path(in2, sep);
+   out = pan::subject_to_path(in2, 1, sep);
    //std::cout<<"input: '"<<in2<<"'\noutput: '"<<out<<"'\n"<<std::endl;
    check(out == expected_out);
    in2 = "Evil, Wicked Queen-e01.jpg(1/01)";
    expected_out = "Evil,_Wicked";
-   out = pan::subject_to_path(in2, sep);
+   out = pan::subject_to_path(in2, 1, sep);
    //std::cout<<"input: '"<<in2<<"'\noutput: '"<<out<<"'\n"<<std::endl;
    check(out == expected_out);
    in2 = "some text here...  and more... 123.jpg";
    expected_out = "some_text_here_and_more";
-   out = pan::subject_to_path(in2, sep);
+   out = pan::subject_to_path(in2, 1, sep);
    //std::cout<<"input: '"<<in2<<"'\noutput: '"<<out<<"'\n"<<std::endl;
    check(out == expected_out);
    in2 = "who are you? 123.jpg";
    expected_out = "who_are_you";
-   out = pan::subject_to_path(in2, sep);
+   out = pan::subject_to_path(in2, 1, sep);
    //std::cout<<"input: '"<<in2<<"'\noutput: '"<<out<<"'\n"<<std::endl;
    check(out == expected_out);
    in2 = "one - two three [1/2] - \"00 - title spaces.foo\" yEnc (1/5)";
    expected_out = "one_two_three";
-   out = pan::subject_to_path(in2, sep);
+   out = pan::subject_to_path(in2, 1, sep);
    //std::cout<<"input: '"<<in2<<"'\noutput: '"<<out<<"'\n"<<std::endl;
    check(out == expected_out);
    in2 = "one - two three [1/2] - \"00 - title spaces.foo\" (/5)";
    expected_out = "one_two_three";
-   out = pan::subject_to_path(in2, sep);
+   out = pan::subject_to_path(in2, 1, sep);
    //std::cout<<"input: '"<<in2<<"'\noutput: '"<<out<<"'\n"<<std::endl;
    check(out == expected_out);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.