| 91 | } |
| 92 | |
| 93 | void TestCustomMake::testDefines() |
| 94 | { |
| 95 | MakeFileResolver mf; |
| 96 | const auto result = mf.processOutput("-DFOO -DFOO=\\\"foo\\\" -DBAR=ASDF -DLALA=1 -DMEH=" |
| 97 | " -DSTR=\"\\\"foo \\\\\\\" bar\\\"\" -DEND" |
| 98 | " -DX=1 -UX", QString()); |
| 99 | QCOMPARE(result.defines.value("FOO", "not found"), QString("\"foo\"")); |
| 100 | QCOMPARE(result.defines.value("BAR", "not found"), QString("ASDF")); |
| 101 | QCOMPARE(result.defines.value("LALA", "not found"), QString("1")); |
| 102 | QCOMPARE(result.defines.value("MEH", "not found"), QString()); |
| 103 | QCOMPARE(result.defines.value("STR", "not found"), QString("\"foo \\\" bar\"")); |
| 104 | QCOMPARE(result.defines.value("END", "not found"), QString()); |
| 105 | QCOMPARE(result.defines.value("X", "not found"), QString("not found")); |
| 106 | } |
| 107 | |
| 108 | QTEST_GUILESS_MAIN(TestCustomMake) |
| 109 |
nothing calls this directly
no test coverage detected