<div dir="ltr">One potentially nice way to test this would be to have all the -O, -o, -S, -s, -Q, and -q just run "script print(N)" where N is some number that changes at each line, then FileCheck the output<br><br><div class="gmail_quote"><div dir="ltr">On Mon, Nov 26, 2018 at 6:38 PM Jim Ingham via Phabricator <<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">jingham added a comment.<br>
<br>
You have to gather all the -O's and -S's and -Q's and add them to the list of code that gets sourced before the file is loaded in the order in which you find them. There can be more than one of each of these and they can be interspersed anywhere among the other command options. Ditto for the -o's, -s's and -q's (except they get run after the file). I don't know how complicated a set of tests I wrote when I originally added these, so you might want to check that all these cases are covered.<br>
<br>
<br>
CHANGES SINCE LAST ACTION<br>
<a href="https://reviews.llvm.org/D54692/new/" rel="noreferrer" target="_blank">https://reviews.llvm.org/D54692/new/</a><br>
<br>
<a href="https://reviews.llvm.org/D54692" rel="noreferrer" target="_blank">https://reviews.llvm.org/D54692</a><br>
<br>
<br>
<br>
</blockquote></div></div>