summary refs log blame commit diff stats
path: root/doc/pydoc/ranger.ext.move.html
blob: 1c8bcf709e619226b7fbca4f23b047f2327ddae7 (plain) (tree)





















                                                                                                                                                                                                                                           
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module ranger.ext.move</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="ranger.html"><font color="#ffffff">ranger</font></a>.<a href="ranger.ext.html"><font color="#ffffff">ext</font></a>.move</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/hut/work/ranger/ranger/ext/move.py">/home/hut/work/ranger/ranger/ext/move.py</a></font></td></tr></table>
    <p></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-move_between"><strong>move_between</strong></a>(current, minimum, maximum, relative<font color="#909090">=0</font>, absolute<font color="#909090">=None</font>)</dt></dl>
</td></tr></table>
</body></html>
span class="s">"test layer 1: foo"); } void test_trace_orders_across_layers() { trace("test layer 1") << "foo" << end(); trace("test layer 2") << "bar" << end(); trace("test layer 1") << "qux" << end(); CHECK_TRACE_CONTENTS("test layer 1: foo\n" "test layer 2: bar\n" "test layer 1: qux\n"); } void test_trace_supports_count() { trace("test layer 1") << "foo" << end(); trace("test layer 1") << "foo" << end(); CHECK_EQ(trace_count("test layer 1", "foo"), 2); } void test_trace_supports_count2() { trace("test layer 1") << "foo" << end(); trace("test layer 1") << "bar" << end(); CHECK_EQ(trace_count("test layer 1"), 2); } void test_trace_count_ignores_trailing_whitespace() { trace("test layer 1") << "foo\n" << end(); CHECK_EQ(trace_count("test layer 1", "foo"), 1); } void test_trace_unescapes_newlines() { trace("test layer 1") << "f\no\no\n" << end(); CHECK_TRACE_CONTENTS("test layer 1: f\\no\\no"); } // pending: DUMP tests // pending: readable_contents() adds newline if necessary. // pending: raise also prints to stderr. // pending: raise doesn't print to stderr if Hide_errors is set. // pending: warn doesn't print to stderr if Hide_errors is set. // pending: warn doesn't print to stderr if Hide_warnings is set. // pending: raise doesn't have to be saved if Hide_errors is set, just printed. // pending: raise prints to stderr if Trace_stream is NULL. // pending: raise prints to stderr if Trace_stream is NULL even if Hide_errors is set. // can't check trace because trace methods call 'split' void test_split_returns_at_least_one_elem() { vector<string> result = split("", ","); CHECK_EQ(result.size(), 1); CHECK_EQ(result.at(0), ""); } void test_split_returns_entire_input_when_no_delim() { vector<string> result = split("abc", ","); CHECK_EQ(result.size(), 1); CHECK_EQ(result.at(0), "abc"); } void test_split_works() { vector<string> result = split("abc,def", ","); CHECK_EQ(result.size(), 2); CHECK_EQ(result.at(0), "abc"); CHECK_EQ(result.at(1), "def"); } void test_split_works2() { vector<string> result = split("abc,def,ghi", ","); CHECK_EQ(result.size(), 3); CHECK_EQ(result.at(0), "abc"); CHECK_EQ(result.at(1), "def"); CHECK_EQ(result.at(2), "ghi"); } void test_split_handles_multichar_delim() { vector<string> result = split("abc,,def,,ghi", ",,"); CHECK_EQ(result.size(), 3); CHECK_EQ(result.at(0), "abc"); CHECK_EQ(result.at(1), "def"); CHECK_EQ(result.at(2), "ghi"); } void test_trim() { CHECK_EQ(trim(""), ""); CHECK_EQ(trim(" "), ""); CHECK_EQ(trim(" "), ""); CHECK_EQ(trim("a"), "a"); CHECK_EQ(trim(" a"), "a"); CHECK_EQ(trim(" a"), "a"); CHECK_EQ(trim(" ab"), "ab"); CHECK_EQ(trim("a "), "a"); CHECK_EQ(trim("a "), "a"); CHECK_EQ(trim("ab "), "ab"); CHECK_EQ(trim(" a "), "a"); CHECK_EQ(trim(" a "), "a"); CHECK_EQ(trim(" ab "), "ab"); }