about summary refs log tree commit diff
path: root/pkgs/by-name/xu/xunit-viewer/test/example.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/xu/xunit-viewer/test/example.nix')
-rw-r--r--pkgs/by-name/xu/xunit-viewer/test/example.nix16
1 files changed, 16 insertions, 0 deletions
diff --git a/pkgs/by-name/xu/xunit-viewer/test/example.nix b/pkgs/by-name/xu/xunit-viewer/test/example.nix
new file mode 100644
index 0000000000000..574b9d784951e
--- /dev/null
+++ b/pkgs/by-name/xu/xunit-viewer/test/example.nix
@@ -0,0 +1,16 @@
+{ xunit-viewer, runCommand, ... }:
+
+runCommand "test-xunit-viewer" {
+  nativeBuildInputs = [ xunit-viewer ];
+} ''
+  mkdir $out
+  xunit-viewer -r ${./example.junit.xml} -o $out/index.html
+  ( set -x
+    grep '<body' $out/index.html
+    # Can't easily grep for parts of the original data, because it ends up
+    # embedded as base64 encoded data (and slightly modified?).
+    # We'd have to really dissect it or render it with a browser.
+    # Fortunately, we've already caught the most severe packaging problems
+    # with just this.
+  )
+''