comparison system/test/TestEnv.h @ 1480:5ac102155409 plugin-path-config

Environment variable lookup fixes, & use this implementation throughout
author Chris Cannam
date Fri, 08 Jun 2018 11:27:40 +0100
parents ba27edcd6102
children 5b2ce6c30258
comparison
equal deleted inserted replaced
1479:ba27edcd6102 1480:5ac102155409
45 { 45 {
46 string value; 46 string value;
47 bool rv = getEnvUtf8("PATH", value); 47 bool rv = getEnvUtf8("PATH", value);
48 QCOMPARE(rv, true); 48 QCOMPARE(rv, true);
49 QVERIFY(value != ""); 49 QVERIFY(value != "");
50 } 50 QVERIFY(value.size() > 5); // Not quite but nearly certain,
51 51 // and weeds out an unfortunate
52 void roundTripShort() 52 // case where we accidentally
53 { 53 // returned the variable's name
54 bool rv = false; 54 // instead of its value!
55 rv = putEnvUtf8("XYZABC", "woo");
56 QCOMPARE(rv, true);
57 string value;
58 rv = getEnvUtf8("XYZABC", value);
59 QCOMPARE(rv, true);
60 QCOMPARE(value, "woo");
61 } 55 }
62 56
63 void roundTripAsciiAscii() 57 void roundTripAsciiAscii()
64 { 58 {
65 bool rv = false; 59 bool rv = false;