Putting dmd error through grep for dustmite

Dennis dkorpel at gmail.com
Mon Nov 5 03:01:43 UTC 2018


I am debugging a case where operator overloading seems to break 
when I define the opBinary templates in a mixin template. On my 
own simple test-case it worked fine, so I'm trying to reduce my 
current code with dustmite.

The file tree is simply:

myproject/
   q16.d

And the command I run is:
```
$ dustmite myproject 'dmd -color=off -unittest q16.d 2>&1 | grep 
"Error: template \`util.q16.Q16_16.opBinary\` does not match any 
template declaration"' --no-redirect
```

It complains that the 'Initial test fails'. However, when I 'cd 
myproject' and run the command myself I get:
```
q16.d(167): Error: template `util.q16.Q16_16.opBinary` does not 
match any template declaration

$ echo $?
0
```

So for me it works. When I reduce the grep string to 
"util.q16.Q16_16.opBinary" it works on dustmite too, but it 
reduces too much since that condition is not precise enough. It 
seems that the backticks of `util.q16.Q16_16.opBinary` are the 
problem. I noticed that the back-ticks aren't there when the 
output is colorised, but adding -color=off didn't seem to make a 
difference. Removing them from the search or double-escaping them 
(like \\\`) also don't work.

Does anybody know what the problem is? I'm using Windows 10 and 
Git Bash.


More information about the Digitalmars-d-learn mailing list