3839
Fix CI. In the process I also fixed a bug in the tangle/ utility.
This commit is contained in:
parent
b7df1a7aab
commit
84537b81bd
|
@ -576,7 +576,7 @@ string header_label(const recipe& caller) {
|
|||
|
||||
string original_header_label(const recipe& caller) {
|
||||
ostringstream out;
|
||||
out << "recipe " << caller.original_name;
|
||||
out << "recipe " << caller.name;
|
||||
for (int i = 0; i < SIZE(caller.ingredients); ++i)
|
||||
out << ' ' << caller.ingredients.at(i).original_string;
|
||||
if (!caller.products.empty()) out << " ->";
|
||||
|
|
|
@ -52,6 +52,8 @@ string original_name;
|
|||
//: original name is only set during load
|
||||
:(before "End Load Recipe Name")
|
||||
result.original_name = result.name;
|
||||
:(replace "out << \"recipe \" << caller.name;" following "string original_header_label(const recipe& caller)")
|
||||
out << "recipe " << caller.original_name;
|
||||
|
||||
:(after "Static Dispatch Phase 3")
|
||||
candidates = strictly_matching_shape_shifting_variants(inst, variants);
|
||||
|
|
|
@ -641,7 +641,7 @@ if ('onhashchange' in window) {
|
|||
<span id="L576" class="LineNr">576 </span>
|
||||
<span id="L577" class="LineNr">577 </span>string <a href='054static_dispatch.cc.html#L577'>original_header_label</a><span class="Delimiter">(</span><span class="Normal">const</span> recipe& caller<span class="Delimiter">)</span> <span class="Delimiter">{</span>
|
||||
<span id="L578" class="LineNr">578 </span> ostringstream out<span class="Delimiter">;</span>
|
||||
<span id="L579" class="LineNr">579 </span> out << <span class="Constant">"recipe "</span> << caller<span class="Delimiter">.</span>original_name<span class="Delimiter">;</span>
|
||||
<span id="L579" class="LineNr">579 </span> out << <span class="Constant">"recipe "</span> << caller<span class="Delimiter">.</span>name<span class="Delimiter">;</span>
|
||||
<span id="L580" class="LineNr">580 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span>
|
||||
<span id="L581" class="LineNr">581 </span> <span class="Conceal">¦</span> out << <span class="Constant">' '</span> << caller<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>original_string<span class="Delimiter">;</span>
|
||||
<span id="L582" class="LineNr">582 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!caller<span class="Delimiter">.</span>products<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> out << <span class="Constant">" ->"</span><span class="Delimiter">;</span>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -251,10 +251,13 @@ void slurp_tangle_string(istream& in, ostream& out) {
|
|||
in.get();
|
||||
char c;
|
||||
while (in >> c) {
|
||||
if (c == '\\') // only works for double-quotes
|
||||
if (c == '\\') {
|
||||
// skip backslash and save next character unconditionally
|
||||
in >> c;
|
||||
out << c;
|
||||
continue;
|
||||
if (c == '"')
|
||||
break;
|
||||
}
|
||||
if (c == '"') break;
|
||||
out << c;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,6 +76,20 @@ void test_tangle_with_tanglecomments_inside_directive() {
|
|||
CHECK_TRACE_DOESNT_CONTAIN("tangle", "//: 1");
|
||||
}
|
||||
|
||||
void test_tangle_with_multiword_directives() {
|
||||
istringstream in("a b\nc\n:(after \"a b\")\nd\n");
|
||||
list<Line> dummy;
|
||||
tangle(in, dummy);
|
||||
CHECK_TRACE_CONTENTS("tangle", "a bdc");
|
||||
}
|
||||
|
||||
void test_tangle_with_quoted_multiword_directives() {
|
||||
istringstream in("a \"b\"\nc\n:(after \"a \\\"b\\\"\")\nd\n");
|
||||
list<Line> dummy;
|
||||
tangle(in, dummy);
|
||||
CHECK_TRACE_CONTENTS("tangle", "a \"b\"dc");
|
||||
}
|
||||
|
||||
void test_tangle2() {
|
||||
istringstream in("a\nb\nc\n:(after b)\nd\n");
|
||||
list<Line> dummy;
|
||||
|
|
Loading…
Reference in New Issue
Block a user