]> de.git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - tests/var-search-order.qc
add variable search order test
[xonotic/gmqcc.git] / tests / var-search-order.qc
diff --git a/tests/var-search-order.qc b/tests/var-search-order.qc
new file mode 100644 (file)
index 0000000..50b6746
--- /dev/null
@@ -0,0 +1,18 @@
+float a = 1000;
+float b = 1001;
+float c = 1002;
+
+void test(float b) {
+       float c = 3002;
+       print(ftos(a), "\n");
+       print(ftos(b), "\n");
+       print(ftos(c), "\n");
+       {
+               float b = 4001;
+               print(ftos(b), "\n");
+       }
+}
+
+void main() {
+       test(2001);
+}