-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.sh
executable file
·32 lines (25 loc) · 1.56 KB
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
# A simple way for test.
# Executing this file, check reports.
# test case: Download single file & `--outfile` option & `--outdir` option
./gh-download -d cli/cli .gitignore
./gh-download -d yuler/gh-download README.md --outfile README.new.md
./gh-download -d yuler/actions nodejs/ci.yml --outfile .github/workflows/nodejs.yml
./gh-download -d yuler/gh-download README.md --outdir outdir
# test case: Download folder & `--outdir` option
./gh-download -d yuler/actions nodejs
./gh-download -d yuler/actions nodejs --outdir .github/workflows
./gh-download -d vercel/next.js examples/basic-export --outdir example
# test case: Download from GitHub `url` with file/folder
./gh-download -d https://github.com/cli/cli/blob/trunk/.gitignore
./gh-download -d https://github.com/cli/cli/blob/trunk/.gitignore --outfile outfile/.gitignore
./gh-download -d https://github.com/vercel/next.js/tree/v13.0.1/examples/basic-export
./gh-download -d https://github.com/vercel/next.js/tree/v13.0.1/examples/basic-export --outdir basic-export
# test case: `--branch` option
./gh-download -d vuejs/core CHANGELOG.md --branch v3.2.0
# test case: multiple path should ignore `--outfile` & `--outdir`
./gh-download -d vuejs/core package.json LICENSE --outfile xxx
./gh-download -d vercel/next.js examples/basic-export examples/basic-css --outdir xxx
# test case: with escape for filename, #11, #16
./gh-download -d https://github.com/VeryGoodOpenSource/dart_frog/tree/main/examples/echo
./gh-download -d https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/UbuntuMono/Regular/complete