From 2ea5235aeace1d3931ce58b3bccc9f37e54bc1cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20N=2E=20Robalino?= Date: Mon, 5 Oct 2020 14:29:04 -0500 Subject: [PATCH] Ensure Wix lists Nu plugin binaries. (#2637) --- tests/shell/mod.rs | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/tests/shell/mod.rs b/tests/shell/mod.rs index eab2e1f41..ec78dee32 100644 --- a/tests/shell/mod.rs +++ b/tests/shell/mod.rs @@ -1 +1,34 @@ +use nu_test_support::{nu, pipeline}; + mod pipeline; + +#[test] +fn plugins_are_declared_with_wix() { + let actual = nu!( + cwd: ".", pipeline( + r#" + echo $(open wix/main.wxs --raw | from xml + | get Wix.children.Product.children.0.Directory.children.0 + | where Directory.attributes.Id == "$(var.PlatformProgramFilesFolder)" + | get Directory.children.Directory.children.0 | last + | get Directory.children.Component.children + | each { echo $it | first } + | skip + | where File.attributes.Name =~ "nu_plugin" + | str substring [_, -4] File.attributes.Name + | get File.attributes.Name + | sort-by + | wrap wix) | merge { + open Cargo.toml | + get bin.name | + drop | + sort-by | + wrap cargo + } + | if $it.wix != $it.cargo { = 1 } { = 0 } + | math sum + "# + )); + + assert_eq!(actual.out, "0"); +}