about summary refs log tree commit diff
path: root/tests/plugins/plugintest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/plugins/plugintest.cc')
-rw-r--r--tests/plugins/plugintest.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/plugins/plugintest.cc b/tests/plugins/plugintest.cc
new file mode 100644
index 000000000000..6b5e6d7cde21
--- /dev/null
+++ b/tests/plugins/plugintest.cc
@@ -0,0 +1,10 @@
+#include "primops.hh"
+
+using namespace nix;
+
+static void prim_anotherNull (EvalState & state, const Pos & pos, Value ** args, Value & v)
+{
+    mkNull(v);
+}
+
+static RegisterPrimOp r("anotherNull", 0, prim_anotherNull);