summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Bürk <admin@airblader.de>2020-04-08 08:41:57 +0200
committerGitHub <noreply@github.com>2020-04-08 08:41:57 +0200
commitb13fd68e08cb3164fc099d2fac74e592e157b77e (patch)
tree265c5452237d77c3b2d37a354b8c66c073f17553
parent582432fcc69d0b37e1197d257434c6b1d2171645 (diff)
parentd1165232ee01640da8804f9df5c551a78410ca74 (diff)
Merge pull request #407 from Stunkymonkey/format_placeholder-tests
format_placeholder percent tests
-rw-r--r--.travis.yml1
-rw-r--r--testcases/020-percentliteral-cpu_usage/expected_output.txt1
-rw-r--r--testcases/020-percentliteral-cpu_usage/i3status.conf9
-rw-r--r--testcases/020-percentliteral-disk/expected_output.txt1
-rw-r--r--testcases/020-percentliteral-disk/i3status.conf9
-rw-r--r--testcases/020-percentliteral-ethernet/expected_output.txt1
-rw-r--r--testcases/020-percentliteral-ethernet/i3status.conf9
-rw-r--r--testcases/020-percentliteral-ipv6/expected_output.txt1
-rw-r--r--testcases/020-percentliteral-ipv6/i3status.conf10
-rw-r--r--testcases/020-percentliteral-load/expected_output.txt1
-rw-r--r--testcases/020-percentliteral-load/i3status.conf9
-rw-r--r--testcases/020-percentliteral-memory/expected_output.txt1
-rw-r--r--testcases/020-percentliteral-memory/i3status.conf9
-rw-r--r--testcases/020-percentliteral-path_exists/expected_output.txt1
-rw-r--r--testcases/020-percentliteral-path_exists/i3status.conf9
-rw-r--r--testcases/020-percentliteral-time/expected_output.txt1
-rw-r--r--testcases/020-percentliteral-time/i3status.conf9
-rw-r--r--testcases/020-percentliteral-tztime/expected_output.txt1
-rw-r--r--testcases/020-percentliteral-tztime/i3status.conf9
-rw-r--r--testcases/020-percentliteral-volume/expected_output.txt1
-rw-r--r--testcases/020-percentliteral-volume/i3status.conf9
-rw-r--r--testcases/020-percentliteral-wireless/expected_output.txt1
-rw-r--r--testcases/020-percentliteral-wireless/i3status.conf10
23 files changed, 113 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
index 2dbb498..cd7487f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -19,6 +19,7 @@ addons:
- libcap2-bin
- clang-format-3.8
- libllvm3.5
+ - pulseaudio
script:
- clang-format-3.8 -i $(find . -name "*.[ch]" | tr '\n' ' ') && git diff --exit-code || (echo 'Code was not formatted using clang-format!'; false)
# TODO: re-enable sanitizers once issues are fixed
diff --git a/testcases/020-percentliteral-cpu_usage/expected_output.txt b/testcases/020-percentliteral-cpu_usage/expected_output.txt
new file mode 100644
index 0000000..a0c0525
--- /dev/null
+++ b/testcases/020-percentliteral-cpu_usage/expected_output.txt
@@ -0,0 +1 @@
+I can %haz literal% % ?
diff --git a/testcases/020-percentliteral-cpu_usage/i3status.conf b/testcases/020-percentliteral-cpu_usage/i3status.conf
new file mode 100644
index 0000000..7f929b2
--- /dev/null
+++ b/testcases/020-percentliteral-cpu_usage/i3status.conf
@@ -0,0 +1,9 @@
+general {
+ output_format = "none"
+}
+
+order += "cpu_usage"
+
+cpu_usage {
+ format = "I can %haz literal% % ?"
+}
diff --git a/testcases/020-percentliteral-disk/expected_output.txt b/testcases/020-percentliteral-disk/expected_output.txt
new file mode 100644
index 0000000..a0c0525
--- /dev/null
+++ b/testcases/020-percentliteral-disk/expected_output.txt
@@ -0,0 +1 @@
+I can %haz literal% % ?
diff --git a/testcases/020-percentliteral-disk/i3status.conf b/testcases/020-percentliteral-disk/i3status.conf
new file mode 100644
index 0000000..42bf032
--- /dev/null
+++ b/testcases/020-percentliteral-disk/i3status.conf
@@ -0,0 +1,9 @@
+general {
+ output_format = "none"
+}
+
+order += "disk /"
+
+disk / {
+ format = "I can %haz literal% % ?"
+}
diff --git a/testcases/020-percentliteral-ethernet/expected_output.txt b/testcases/020-percentliteral-ethernet/expected_output.txt
new file mode 100644
index 0000000..a0c0525
--- /dev/null
+++ b/testcases/020-percentliteral-ethernet/expected_output.txt
@@ -0,0 +1 @@
+I can %haz literal% % ?
diff --git a/testcases/020-percentliteral-ethernet/i3status.conf b/testcases/020-percentliteral-ethernet/i3status.conf
new file mode 100644
index 0000000..a7674aa
--- /dev/null
+++ b/testcases/020-percentliteral-ethernet/i3status.conf
@@ -0,0 +1,9 @@
+general {
+ output_format = "none"
+}
+
+order += "ethernet NONEXISTINGETHERNETDEVICE"
+
+ethernet NONEXISTINGETHERNETDEVICE {
+ format_down = "I can %haz literal% % ?"
+}
diff --git a/testcases/020-percentliteral-ipv6/expected_output.txt b/testcases/020-percentliteral-ipv6/expected_output.txt
new file mode 100644
index 0000000..a0c0525
--- /dev/null
+++ b/testcases/020-percentliteral-ipv6/expected_output.txt
@@ -0,0 +1 @@
+I can %haz literal% % ?
diff --git a/testcases/020-percentliteral-ipv6/i3status.conf b/testcases/020-percentliteral-ipv6/i3status.conf
new file mode 100644
index 0000000..5c0d527
--- /dev/null
+++ b/testcases/020-percentliteral-ipv6/i3status.conf
@@ -0,0 +1,10 @@
+general {
+ output_format = "none"
+}
+
+order += "ipv6"
+
+ipv6 {
+ format_up = "I can %haz literal% % ?"
+ format_down = "I can %haz literal% % ?"
+}
diff --git a/testcases/020-percentliteral-load/expected_output.txt b/testcases/020-percentliteral-load/expected_output.txt
new file mode 100644
index 0000000..a0c0525
--- /dev/null
+++ b/testcases/020-percentliteral-load/expected_output.txt
@@ -0,0 +1 @@
+I can %haz literal% % ?
diff --git a/testcases/020-percentliteral-load/i3status.conf b/testcases/020-percentliteral-load/i3status.conf
new file mode 100644
index 0000000..e001bac
--- /dev/null
+++ b/testcases/020-percentliteral-load/i3status.conf
@@ -0,0 +1,9 @@
+general {
+ output_format = "none"
+}
+
+order += "load"
+
+load {
+ format = "I can %haz literal% % ?"
+}
diff --git a/testcases/020-percentliteral-memory/expected_output.txt b/testcases/020-percentliteral-memory/expected_output.txt
new file mode 100644
index 0000000..a0c0525
--- /dev/null
+++ b/testcases/020-percentliteral-memory/expected_output.txt
@@ -0,0 +1 @@
+I can %haz literal% % ?
diff --git a/testcases/020-percentliteral-memory/i3status.conf b/testcases/020-percentliteral-memory/i3status.conf
new file mode 100644
index 0000000..9dd8105
--- /dev/null
+++ b/testcases/020-percentliteral-memory/i3status.conf
@@ -0,0 +1,9 @@
+general {
+ output_format = "none"
+}
+
+order += "memory"
+
+memory {
+ format = "I can %haz literal% % ?"
+}
diff --git a/testcases/020-percentliteral-path_exists/expected_output.txt b/testcases/020-percentliteral-path_exists/expected_output.txt
new file mode 100644
index 0000000..a0c0525
--- /dev/null
+++ b/testcases/020-percentliteral-path_exists/expected_output.txt
@@ -0,0 +1 @@
+I can %haz literal% % ?
diff --git a/testcases/020-percentliteral-path_exists/i3status.conf b/testcases/020-percentliteral-path_exists/i3status.conf
new file mode 100644
index 0000000..5972914
--- /dev/null
+++ b/testcases/020-percentliteral-path_exists/i3status.conf
@@ -0,0 +1,9 @@
+general {
+ output_format = "none"
+}
+
+order += "path_exists all"
+
+path_exists all {
+ format = "I can %haz literal% % ?"
+}
diff --git a/testcases/020-percentliteral-time/expected_output.txt b/testcases/020-percentliteral-time/expected_output.txt
new file mode 100644
index 0000000..a0c0525
--- /dev/null
+++ b/testcases/020-percentliteral-time/expected_output.txt
@@ -0,0 +1 @@
+I can %haz literal% % ?
diff --git a/testcases/020-percentliteral-time/i3status.conf b/testcases/020-percentliteral-time/i3status.conf
new file mode 100644
index 0000000..22cb2a0
--- /dev/null
+++ b/testcases/020-percentliteral-time/i3status.conf
@@ -0,0 +1,9 @@
+general {
+ output_format = "none"
+}
+
+order += "time"
+
+time {
+ format = "I can %%haz literal% % ?"
+}
diff --git a/testcases/020-percentliteral-tztime/expected_output.txt b/testcases/020-percentliteral-tztime/expected_output.txt
new file mode 100644
index 0000000..a0c0525
--- /dev/null
+++ b/testcases/020-percentliteral-tztime/expected_output.txt
@@ -0,0 +1 @@
+I can %haz literal% % ?
diff --git a/testcases/020-percentliteral-tztime/i3status.conf b/testcases/020-percentliteral-tztime/i3status.conf
new file mode 100644
index 0000000..c20099c
--- /dev/null
+++ b/testcases/020-percentliteral-tztime/i3status.conf
@@ -0,0 +1,9 @@
+general {
+ output_format = "none"
+}
+
+order += "tztime berlin"
+
+tztime berlin {
+ format_time = "I can %haz literal% % ?"
+}
diff --git a/testcases/020-percentliteral-volume/expected_output.txt b/testcases/020-percentliteral-volume/expected_output.txt
new file mode 100644
index 0000000..a0c0525
--- /dev/null
+++ b/testcases/020-percentliteral-volume/expected_output.txt
@@ -0,0 +1 @@
+I can %haz literal% % ?
diff --git a/testcases/020-percentliteral-volume/i3status.conf b/testcases/020-percentliteral-volume/i3status.conf
new file mode 100644
index 0000000..3a0edb5
--- /dev/null
+++ b/testcases/020-percentliteral-volume/i3status.conf
@@ -0,0 +1,9 @@
+general {
+ output_format = "none"
+}
+
+order += "volume master"
+
+volume master {
+ format = "I can %haz literal% % ?"
+}
diff --git a/testcases/020-percentliteral-wireless/expected_output.txt b/testcases/020-percentliteral-wireless/expected_output.txt
new file mode 100644
index 0000000..a0c0525
--- /dev/null
+++ b/testcases/020-percentliteral-wireless/expected_output.txt
@@ -0,0 +1 @@
+I can %haz literal% % ?
diff --git a/testcases/020-percentliteral-wireless/i3status.conf b/testcases/020-percentliteral-wireless/i3status.conf
new file mode 100644
index 0000000..69a25a3
--- /dev/null
+++ b/testcases/020-percentliteral-wireless/i3status.conf
@@ -0,0 +1,10 @@
+general {
+ output_format = "none"
+}
+
+order += "wireless _first_"
+
+wireless _first_ {
+ format_up = "I can %haz literal% % ?"
+ format_down = "I can %haz literal% % ?"
+}