test with trycmd

This commit is contained in:
figsoda 2023-01-03 13:34:06 -05:00
parent afae462b3f
commit d7e858621a
47 changed files with 576 additions and 0 deletions

379
Cargo.lock generated
View File

@ -19,6 +19,12 @@ dependencies = [
"winapi",
]
[[package]]
name = "autocfg"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "bitflags"
version = "1.3.2"
@ -31,6 +37,12 @@ version = "1.0.78"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d"
[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "clap"
version = "4.0.32"
@ -90,6 +102,81 @@ dependencies = [
"roff",
]
[[package]]
name = "concolor"
version = "0.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "318d6c16e73b3a900eb212ad6a82fc7d298c5ab8184c7a9998646455bc474a16"
dependencies = [
"bitflags",
"concolor-query",
"is-terminal",
]
[[package]]
name = "concolor-query"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82a90734b3d5dcf656e7624cca6bce9c3a90ee11f900e80141a7427ccfb3d317"
[[package]]
name = "content_inspector"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7bda66e858c683005a53a9a60c69a4aca7eeaa45d124526e389f7aec8e62f38"
dependencies = [
"memchr",
]
[[package]]
name = "crossbeam-channel"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521"
dependencies = [
"cfg-if",
"crossbeam-utils",
]
[[package]]
name = "crossbeam-deque"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc"
dependencies = [
"cfg-if",
"crossbeam-epoch",
"crossbeam-utils",
]
[[package]]
name = "crossbeam-epoch"
version = "0.9.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a"
dependencies = [
"autocfg",
"cfg-if",
"crossbeam-utils",
"memoffset",
"scopeguard",
]
[[package]]
name = "crossbeam-utils"
version = "0.8.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f"
dependencies = [
"cfg-if",
]
[[package]]
name = "dunce"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0bd4b30a6560bbd9b4620f4de34c3f14f60848e58a9b7216801afcb4c7b31c3c"
[[package]]
name = "either"
version = "1.8.0"
@ -129,6 +216,27 @@ dependencies = [
"libc",
]
[[package]]
name = "fastrand"
version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499"
dependencies = [
"instant",
]
[[package]]
name = "filetime"
version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e884668cd0c7480504233e951174ddc3b382f7c2666e3b7310b5c4e7b0c37f9"
dependencies = [
"cfg-if",
"libc",
"redox_syscall",
"windows-sys",
]
[[package]]
name = "form_urlencoded"
version = "1.1.0"
@ -138,6 +246,18 @@ dependencies = [
"percent-encoding",
]
[[package]]
name = "glob"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
[[package]]
name = "hashbrown"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
[[package]]
name = "heck"
version = "0.4.0"
@ -162,6 +282,22 @@ dependencies = [
"libc",
]
[[package]]
name = "humantime"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]]
name = "humantime-serde"
version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57a3db5ea5923d99402c94e9feb261dc5ee9b4efa158b0315f788cf549cc200c"
dependencies = [
"humantime",
"serde",
]
[[package]]
name = "idna"
version = "0.3.0"
@ -172,6 +308,25 @@ dependencies = [
"unicode-normalization",
]
[[package]]
name = "indexmap"
version = "1.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399"
dependencies = [
"autocfg",
"hashbrown",
]
[[package]]
name = "instant"
version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
dependencies = [
"cfg-if",
]
[[package]]
name = "io-lifetimes"
version = "1.0.3"
@ -227,6 +382,46 @@ version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4"
[[package]]
name = "memchr"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
[[package]]
name = "memoffset"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4"
dependencies = [
"autocfg",
]
[[package]]
name = "nom8"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae01545c9c7fc4486ab7debaf2aad7003ac19431791868fb2e8066df97fad2f8"
dependencies = [
"memchr",
]
[[package]]
name = "normalize-line-endings"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be"
[[package]]
name = "num_cpus"
version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b"
dependencies = [
"hermit-abi 0.2.6",
"libc",
]
[[package]]
name = "nurl"
version = "0.3.1"
@ -242,6 +437,7 @@ dependencies = [
"rustc-hash",
"serde",
"serde_json",
"trycmd",
"url",
]
@ -251,6 +447,16 @@ version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66"
[[package]]
name = "os_pipe"
version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6a252f1f8c11e84b3ab59d7a488e48e4478a93937e027076638c49536204639"
dependencies = [
"libc",
"windows-sys",
]
[[package]]
name = "os_str_bytes"
version = "6.4.1"
@ -314,6 +520,46 @@ dependencies = [
"proc-macro2",
]
[[package]]
name = "rayon"
version = "1.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7"
dependencies = [
"either",
"rayon-core",
]
[[package]]
name = "rayon-core"
version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3"
dependencies = [
"crossbeam-channel",
"crossbeam-deque",
"crossbeam-utils",
"num_cpus",
]
[[package]]
name = "redox_syscall"
version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
dependencies = [
"bitflags",
]
[[package]]
name = "remove_dir_all"
version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
dependencies = [
"winapi",
]
[[package]]
name = "roff"
version = "0.2.1"
@ -346,6 +592,21 @@ version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde"
[[package]]
name = "same-file"
version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
dependencies = [
"winapi-util",
]
[[package]]
name = "scopeguard"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
[[package]]
name = "serde"
version = "1.0.152"
@ -377,6 +638,46 @@ dependencies = [
"serde",
]
[[package]]
name = "shlex"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3"
[[package]]
name = "similar"
version = "2.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "420acb44afdae038210c99e69aae24109f32f15500aa708e81d46c9f29d55fcf"
[[package]]
name = "snapbox"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "efbd7b250c7243273b5aec4ca366fced84ad716d110bb7baae4814678952ebde"
dependencies = [
"concolor",
"content_inspector",
"dunce",
"filetime",
"libc",
"normalize-line-endings",
"os_pipe",
"similar",
"snapbox-macros",
"tempfile",
"wait-timeout",
"walkdir",
"windows-sys",
"yansi",
]
[[package]]
name = "snapbox-macros"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "485e65c1203eb37244465e857d15a26d3a85a5410648ccb53b18bd44cb3a7336"
[[package]]
name = "strsim"
version = "0.10.0"
@ -404,6 +705,20 @@ dependencies = [
"unicode-ident",
]
[[package]]
name = "tempfile"
version = "3.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4"
dependencies = [
"cfg-if",
"fastrand",
"libc",
"redox_syscall",
"remove_dir_all",
"winapi",
]
[[package]]
name = "termcolor"
version = "1.1.3"
@ -438,6 +753,44 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
[[package]]
name = "toml_datetime"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "808b51e57d0ef8f71115d8f3a01e7d3750d01c79cac4b3eda910f4389fdf92fd"
dependencies = [
"serde",
]
[[package]]
name = "toml_edit"
version = "0.16.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd30deba9a1cd7153c22aecf93e86df639e7b81c622b0af8d9255e989991a7b7"
dependencies = [
"indexmap",
"itertools",
"nom8",
"serde",
"toml_datetime",
]
[[package]]
name = "trycmd"
version = "0.14.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd0b37ad14571d245340fb1d56cec65507bd73571005adc63dc968aa38fa9d49"
dependencies = [
"glob",
"humantime",
"humantime-serde",
"rayon",
"serde",
"shlex",
"snapbox",
"toml_edit",
]
[[package]]
name = "unicase"
version = "2.6.0"
@ -491,6 +844,26 @@ version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
[[package]]
name = "wait-timeout"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6"
dependencies = [
"libc",
]
[[package]]
name = "walkdir"
version = "2.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56"
dependencies = [
"same-file",
"winapi",
"winapi-util",
]
[[package]]
name = "winapi"
version = "0.3.9"
@ -578,3 +951,9 @@ name = "windows_x86_64_msvc"
version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5"
[[package]]
name = "yansi"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec"

View File

@ -32,6 +32,9 @@ clap_complete = "4.0.7"
clap_mangen = "0.2.6"
url = "2.3.1"
[dev-dependencies]
trycmd = "0.14.6"
[profile.release]
lto = true
panic = "abort"

7
tests/cmd/arg.stdout Normal file
View File

@ -0,0 +1,7 @@
fetchFromGitHub {
owner = "Koihik";
repo = "LuaFormatter";
rev = "1.3.0";
hash = "sha256-O42sNIFDi2Dv6KWkBynrR60RABCAitSVTp42W6w0tcg=";
fetchSubmodules = true;
}

7
tests/cmd/arg.toml Normal file
View File

@ -0,0 +1,7 @@
args = [
"https://github.com/Koihik/LuaFormatter",
"1.3.0",
"--arg",
"fetchSubmodules",
"true",
]

7
tests/cmd/arg_str.stdout Normal file
View File

@ -0,0 +1,7 @@
fetchFromGitHub {
owner = "nix-community";
repo = "nurl";
rev = "v0.3.0";
hash = "sha256-jZ+cCp1THDhfHH5yMmRPjGuthOqsgcF/3OjZ61FMdA4=";
name = "nurl-src";
}

7
tests/cmd/arg_str.toml Normal file
View File

@ -0,0 +1,7 @@
args = [
"https://github.com/nix-community/nurl",
"v0.3.0",
"--arg-str",
"name",
"nurl-src",
]

View File

@ -0,0 +1,6 @@
fetchFromBitbucket {
owner = "asbuch";
repo = "lrcalc";
rev = "lrcalc-2.0";
hash = "sha256-9u2tNAp1DDPHu7FtFZWDrVkqCeFCyz0RI8oXmmSwj5I=";
}

View File

@ -0,0 +1 @@
args = ["https://bitbucket.org/asbuch/lrcalc", "lrcalc-2.0"]

View File

@ -0,0 +1,5 @@
fetchgit {
url = "https://github.com/nix-community/nurl";
rev = "refs/tags/v0.3.0";
hash = "sha256-jZ+cCp1THDhfHH5yMmRPjGuthOqsgcF/3OjZ61FMdA4=";
}

View File

@ -0,0 +1,6 @@
args = [
"https://github.com/nix-community/nurl",
"refs/tags/v0.3.0",
"--fetcher",
"fetchgit",
]

View File

@ -0,0 +1,5 @@
fetchgit {
url = "git://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git";
rev = "refs/tags/v1.9.0";
hash = "sha256-W38CWoPnkt0+VkVp+uW+sjWjo6MXYq2eTXRxWKyQph8=";
}

View File

@ -0,0 +1,6 @@
args = [
"git://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git",
"refs/tags/v1.9.0",
"--fetcher",
"fetchgit",
]

View File

@ -0,0 +1,5 @@
fetchgit {
url = "https://github.com/nix-community/nurl";
rev = "refs/tags/v0.3.0";
hash = "sha256-jZ+cCp1THDhfHH5yMmRPjGuthOqsgcF/3OjZ61FMdA4=";
}

View File

@ -0,0 +1,6 @@
args = [
"git+https://github.com/nix-community/nurl",
"refs/tags/v0.3.0",
"--fetcher",
"fetchgit",
]

View File

@ -0,0 +1,7 @@
fetchFromGitea {
domain = "codeberg.org";
owner = "nsxiv";
repo = "nsxiv";
rev = "v30";
hash = "sha256-swzTdQ6ow1At4bKRORqz6fb0Ej92yU9rlI/OgcinPu4=";
}

View File

@ -0,0 +1 @@
args = ["https://codeberg.org/nsxiv/nsxiv", "v30"]

View File

@ -0,0 +1,6 @@
fetchFromGitHub {
owner = "nix-community";
repo = "nurl";
rev = "v0.3.0";
hash = "sha256-jZ+cCp1THDhfHH5yMmRPjGuthOqsgcF/3OjZ61FMdA4=";
}

View File

@ -0,0 +1 @@
args = ["https://github.com/nix-community/nurl", "v0.3.0"]

View File

@ -0,0 +1,5 @@
fetchFromGitiles {
url = "https://android.googlesource.com/platform/external/minijail";
rev = "linux-v18";
hash = "sha256-OpwzISZ5iZNQvJAX7UJJ4gELEaVfcQgY9cqMM0YvBzc=";
}

View File

@ -0,0 +1 @@
args = ["https://android.googlesource.com/platform/external/minijail", "linux-v18"]

View File

@ -0,0 +1,6 @@
fetchFromGitLab {
owner = "timvisee";
repo = "ffsend";
rev = "v0.2.0";
hash = "sha256-0+ekty3dK3IVkFiNn3/NxOPJhkp3ZkTKaVC404t2Rac=";
}

View File

@ -0,0 +1 @@
args = ["https://gitlab.com/timvisee/ffsend", "v0.2.0"]

View File

@ -0,0 +1,8 @@
fetchFromGitLab {
domain = "gitlab.gnome.org";
group = "World";
owner = "Phosh";
repo = "phosh";
rev = "v0.20.0";
hash = "sha256-KKoRAUqy9l/Y/R7iLqZe6sHcyHHvRRTj+WeVmyAm7+I=";
}

View File

@ -0,0 +1 @@
args = ["https://gitlab.gnome.org/World/Phosh/phosh", "v0.20.0"]

View File

@ -0,0 +1,7 @@
fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "GNOME";
repo = "libadwaita";
rev = "1.2.0";
hash = "sha256-3lH7Vi9M8k+GSrCpvruRpLrIpMoOakKbcJlaAc/FK+U=";
}

View File

@ -0,0 +1 @@
args = ["https://gitlab.gnome.org/GNOME/libadwaita", "1.2.0"]

View File

@ -0,0 +1,6 @@
fetchFromGitLab {
owner = "timvisee";
repo = "ffsend";
rev = "v0.2.0";
hash = "sha256-0+ekty3dK3IVkFiNn3/NxOPJhkp3ZkTKaVC404t2Rac=";
}

View File

@ -0,0 +1 @@
args = ["https://gitlab.com/timvisee/ffsend/", "v0.2.0"]

View File

@ -0,0 +1,5 @@
fetchhg {
url = "https://hg.sr.ht/~scoopta/wofi";
rev = "v1.3";
hash = "sha256-GxMjEXBPQniD+Yc9QZjd8TH4ILJAX5dNzrjxDawhy8w=";
}

View File

@ -0,0 +1 @@
args = ["https://hg.sr.ht/~scoopta/wofi", "v1.3", "--fetcher", "fetchhg"]

View File

@ -0,0 +1,5 @@
fetchhg {
url = "https://hg.sr.ht/~scoopta/wofi";
rev = "v1.3";
hash = "sha256-GxMjEXBPQniD+Yc9QZjd8TH4ILJAX5dNzrjxDawhy8w=";
}

View File

@ -0,0 +1 @@
args = ["hg+https://hg.sr.ht/~scoopta/wofi", "v1.3", "--fetcher", "fetchhg"]

View File

@ -0,0 +1,5 @@
fetchFromRepoOrCz {
repo = "tinycc";
rev = "release_0_9_27";
hash = "sha256-5yRaB/gxk1Gm/rukAe0pm1PEl5NdieVFngp87jENtYo=";
}

View File

@ -0,0 +1 @@
args = ["https://repo.or.cz/tinycc.git", "release_0_9_27"]

View File

@ -0,0 +1,6 @@
fetchFromSourcehut {
owner = "~sircmpwn";
repo = "core.sr.ht";
rev = "0.60.0";
hash = "sha256-d2lfBMf5dJeqvTT6NWPNDSuYC3Hgof8PanYwSHqOCEk=";
}

View File

@ -0,0 +1 @@
args = ["https://git.sr.ht/~sircmpwn/core.sr.ht", "0.60.0"]

View File

@ -0,0 +1,5 @@
fetchsvn {
url = "svn://svn.mplayerhq.hu/mplayer/trunk";
rev = "30000";
sha256 = "sha256-gmiB9GR2VfzTzdIWe6kVCldaau6Cq0F9J0exFZChT1o=";
}

View File

@ -0,0 +1 @@
args = ["svn://svn.mplayerhq.hu/mplayer/trunk", "30000"]

6
tests/cmd/indent.stdout Normal file
View File

@ -0,0 +1,6 @@
fetchFromGitHub {
owner = "nix-community";
repo = "nurl";
rev = "v0.3.0";
hash = "sha256-jZ+cCp1THDhfHH5yMmRPjGuthOqsgcF/3OjZ61FMdA4=";
}

1
tests/cmd/indent.toml Normal file
View File

@ -0,0 +1 @@
args = ["https://github.com/nix-community/nurl", "v0.3.0", "--indent", "2"]

1
tests/cmd/json.stdout Normal file
View File

@ -0,0 +1 @@
{"args":{"hash":"sha256-jZ+cCp1THDhfHH5yMmRPjGuthOqsgcF/3OjZ61FMdA4=","owner":"nix-community","repo":"nurl","rev":"v0.3.0"},"fetcher":"fetchFromGitHub"}

1
tests/cmd/json.toml Normal file
View File

@ -0,0 +1 @@
args = ["https://github.com/nix-community/nurl", "v0.3.0", "--json"]

View File

@ -0,0 +1,6 @@
fetchFromGitHub {
owner = "nix-community";
repo = pname;
rev = "v0.3.0";
hash = "sha256-jZ+cCp1THDhfHH5yMmRPjGuthOqsgcF/3OjZ61FMdA4=";
}

7
tests/cmd/overwrite.toml Normal file
View File

@ -0,0 +1,7 @@
args = [
"https://github.com/nix-community/nurl",
"v0.3.0",
"--overwrite",
"repo",
"pname",
]

View File

@ -0,0 +1,6 @@
fetchFromGitHub {
owner = "nix-community";
repo = "nurl";
rev = "v${version}";
hash = "sha256-jZ+cCp1THDhfHH5yMmRPjGuthOqsgcF/3OjZ61FMdA4=";
}

View File

@ -0,0 +1,7 @@
args = [
"https://github.com/nix-community/nurl",
"v0.3.0",
"--overwrite-str",
"rev",
"v${version}",
]

8
tests/integration.rs Normal file
View File

@ -0,0 +1,8 @@
use trycmd::TestCases;
#[test]
fn integration() {
TestCases::new()
.default_bin_name("nurl")
.case("tests/cmd/**/*.toml");
}