diff options
| author | Roman Smrž <roman.smrz@seznam.cz> | 2025-12-13 21:39:15 +0100 |
|---|---|---|
| committer | Roman Smrž <roman.smrz@seznam.cz> | 2025-12-16 21:57:05 +0100 |
| commit | abcb6bf31ff9c86c4c1f3edf0b184dae8159f812 (patch) | |
| tree | 80b362f5f93b716ce90ad9d8339ff028b6a87f5a /test/script/shell.et | |
| parent | aecba79be823cdcf5d48042f84adfe46c209f109 (diff) | |
Changelog: Prepare used artifacts for the `shell` command
Diffstat (limited to 'test/script/shell.et')
| -rw-r--r-- | test/script/shell.et | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/test/script/shell.et b/test/script/shell.et new file mode 100644 index 0000000..c3a2282 --- /dev/null +++ b/test/script/shell.et @@ -0,0 +1,51 @@ +module shell + +import common + +asset scripts: + path: ../asset/shell + + +test ShellPrepare: + node n + shell on n as git_init: + mkdir -p dir_r1 + git -C dir_r1 -c init.defaultBranch=master init -q + git -C dir_r1 -c user.name=test -c user.email=test commit -q --allow-empty -m 'initial commit' + touch dir_r1/file_r1 + git -C dir_r1 add file_r1 + git -C dir_r1 -c user.name=test -c user.email=test commit -q --allow-empty -m 'commit r1' + git -C dir_r1 rev-parse HEAD^{tree} + + mkdir -p dir_r2 + git -C dir_r2 -c init.defaultBranch=master init -q + git -C dir_r2 -c user.name=test -c user.email=test commit -q --allow-empty -m 'initial commit' + touch dir_r2/file_r2 + git -C dir_r2 add file_r2 + git -C dir_r2 -c user.name=test -c user.email=test commit -q --allow-empty -m 'commit r2' + git -C dir_r2 rev-parse HEAD^{tree} + + expect /([0-9a-f]+)/ from git_init capture r1t + expect /([0-9a-f]+)/ from git_init capture r2t + + local: + spawn on n as p args [ "--storage=minici", "--repo=r1:./dir_r1", "--repo=r2:./dir_r2", "${scripts.path}/minici.yaml", "run", "generate" ] + expect /run-finish/ from p + + local: + spawn on n as p args [ "--storage=minici", "--repo=r1:./dir_r1", "--repo=r2:./dir_r2", "${scripts.path}/minici.yaml", "shell", "combine.$r1t.$r2t" ] + with p: + send "ls ." + expect /d1/ + expect /d2/ + expect /f1/ + expect /dir/ + with p: + send "ls d1" + expect /file_r1/ + with p: + send "ls d2" + expect /file_r2/ + with p: + send "ls dir" + expect /f2/ |