[Lldb-commits] [PATCH] D60566: [test] Convert CommandScriptImmediateOutput from pexpect to lit
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Apr 11 07:44:00 PDT 2019
labath added inline comments.
================
Comment at: lldb/lit/Commands/CommandScriptImmediateOutput/CommandScriptImmediateOutputFile.test:4-5
+
+# RUN: echo "READ" > %t.read.txt
+# RUN: echo "READ PLUS" > %t.read_plus.txt
+
----------------
The original test writes to all files it checks. I believe the idea is to check that the stuff should be there really is, and stuff that shouldn't be isn't. So the new test should probably do that too, and have a negative check that e.g. mode "w" overwrites the initial echoed string.
================
Comment at: lldb/lit/Commands/CommandScriptImmediateOutput/CommandScriptImmediateOutputFile.test:10-15
+# RUN: -o 'mywrite "%t.read.txt" r' \
+# RUN: -o 'mywrite "%t.write.txt" w' \
+# RUN: -o 'mywrite "%t.append.txt" a' \
+# RUN: -o 'mywrite "%t.write_plus.txt" w+' \
+# RUN: -o 'mywrite "%t.read_plus.txt" r+' \
+# RUN: -o 'mywrite "%t.append_plus.txt" a+' \
----------------
Based on some earlier attempts, I think windows will have a problem with the nested quotes. That's why most tests uses `-s %s` or something like that. Though doing that is a bit tricky here...
Since we're already kind of assuming that %t does not contain spaces, you might be able to get away with just dropping the inner set of quotes.
Repository:
rLLDB LLDB
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60566/new/
https://reviews.llvm.org/D60566
More information about the lldb-commits
mailing list