diff 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
line wrap: on
line diff
--- a/system/test/TestEnv.h	Thu Jun 07 16:49:09 2018 +0100
+++ b/system/test/TestEnv.h	Fri Jun 08 11:27:40 2018 +0100
@@ -47,17 +47,11 @@
         bool rv = getEnvUtf8("PATH", value);
         QCOMPARE(rv, true);
         QVERIFY(value != "");
-    }
-    
-    void roundTripShort()
-    {
-        bool rv = false;
-        rv = putEnvUtf8("XYZABC", "woo");
-        QCOMPARE(rv, true);
-        string value;
-        rv = getEnvUtf8("XYZABC", value);
-        QCOMPARE(rv, true);
-        QCOMPARE(value, "woo");
+        QVERIFY(value.size() > 5); // Not quite but nearly certain,
+                                   // and weeds out an unfortunate
+                                   // case where we accidentally
+                                   // returned the variable's name
+                                   // instead of its value!
     }
     
     void roundTripAsciiAscii()