summaryrefslogtreecommitdiffstats
path: root/test/configs
diff options
context:
space:
mode:
Diffstat (limited to 'test/configs')
-rw-r--r--test/configs/installed/anno-test.json12
-rwxr-xr-xtest/configs/installed/anno-test.sh3
-rw-r--r--test/configs/installed/hw-url-handler.json10
-rw-r--r--test/configs/installed/hw-url-handler.lnav10
4 files changed, 35 insertions, 0 deletions
diff --git a/test/configs/installed/anno-test.json b/test/configs/installed/anno-test.json
new file mode 100644
index 0000000..24806c5
--- /dev/null
+++ b/test/configs/installed/anno-test.json
@@ -0,0 +1,12 @@
+{
+ "$schema": "https://lnav.org/schemas/config-v1.schema.json",
+ "log": {
+ "annotations": {
+ "org.lnav.test": {
+ "description": "test annotation",
+ "condition": ":c_ip IS NOT NULL AND $TEST_ANNO = '1'",
+ "handler": "anno-test.sh"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/test/configs/installed/anno-test.sh b/test/configs/installed/anno-test.sh
new file mode 100755
index 0000000..7633240
--- /dev/null
+++ b/test/configs/installed/anno-test.sh
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+echo 'Hello, <span style="color: #f00">World</span>!'
diff --git a/test/configs/installed/hw-url-handler.json b/test/configs/installed/hw-url-handler.json
new file mode 100644
index 0000000..f1d3c73
--- /dev/null
+++ b/test/configs/installed/hw-url-handler.json
@@ -0,0 +1,10 @@
+{
+ "$schema": "https://lnav.org/schemas/config-v1.schema.json",
+ "tuning": {
+ "url-scheme": {
+ "hw": {
+ "handler": "hw-url-handler"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/test/configs/installed/hw-url-handler.lnav b/test/configs/installed/hw-url-handler.lnav
new file mode 100644
index 0000000..dcf9ec1
--- /dev/null
+++ b/test/configs/installed/hw-url-handler.lnav
@@ -0,0 +1,10 @@
+#
+# @synopsis: hw-url-handler
+# @description: Hello, World! URL handler
+#
+
+;SELECT jget(url, '/host') AS hostname,
+ jget(url, '/path') AS upath
+ FROM (SELECT parse_url($1) AS url)
+
+:sh echo "Hello, $upath at $hostname!"