Extract out xpath to a plugin. (#2661)

This commit is contained in:
Andrés N. Robalino
2020-10-12 18:18:39 -05:00
committed by GitHub
parent 2573441e28
commit 4e931fa73f
14 changed files with 292 additions and 203 deletions

View File

@@ -7,7 +7,8 @@ fn plugins_are_declared_with_wix() {
let actual = nu!(
cwd: ".", pipeline(
r#"
echo $(open wix/main.wxs --raw | from xml
open Cargo.toml | get bin.name | drop | sort-by | wrap cargo | merge {
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
@@ -18,13 +19,9 @@ fn plugins_are_declared_with_wix() {
| 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
}
| wrap wix
}
| default wix _
| if $it.wix != $it.cargo { = 1 } { = 0 }
| math sum
"#