tst_shell_unix.cpp
1 #include "tst_shell.h" 2 3 #include <QTest> 4 5 namespace NeovimQt { 6 7 QClipboard::Mode GetClipboardMode(char reg) noexcept 8 { 9 if (reg != '+') { 10 return QClipboard::Selection; 11 } 12 13 return QClipboard::Clipboard; 14 } 15 16 QString GetPlatformTestFont() noexcept 17 { 18 return QStringLiteral("DejaVu Sans Mono"); 19 } 20 21 QStringList BinaryAndArgumentsNoForkWithCommand(const QString& command) noexcept 22 { 23 return { NVIM_QT_BINARY, "--nofork", "--", "-c", command }; 24 } 25 26 void AddPlatformSpecificExitCodeCases() noexcept 27 { 28 // On UNIX-like operating systems, the child exit code is represented as a 29 // 8-bit integer. Therefore 256 overflows and becomes 0. 30 // Reference: man for wait(2). 31 QTest::newRow("Exit Code Overflow: 256cq") 32 << 256 << 0 << QByteArray("256cq"); 33 } 34 35 } // namespace NeovimQt