diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-05-14 14:10:56 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-05-14 16:54:16 +0300 |
commit | 2df57d72b65012674e6bc64dec66d9b3fd7f993b (patch) | |
tree | 81c893c0b745145d9a3779b9ce3fb41c57e17956 /tests | |
parent | 1ddbf3409f76f0dd91a9402e602bc1ea1b12f8cd (diff) |
Fallback to output directory removal for --keep-out on disfigure failure
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pkg-configure.test | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/pkg-configure.test b/tests/pkg-configure.test index 3b455ff..f950f68 100644 --- a/tests/pkg-configure.test +++ b/tests/pkg-configure.test @@ -383,3 +383,26 @@ if ($cxx.target.class != 'windows') $pkg_purge libbar 2>'purged libbar/1.3.0' } } + +: keep-out +: +{ + : fallback + : + : Test that pkg-disfigure falls back to the external package output directory + : removal if the source directory have gone. + : + { + $clone_root_cfg; + + # Configure libhello as an external package. + # + cp --no-cleanup -r $src/libhello-1.0.0 ./libhello; + $pkg_unpack -e ./libhello; + $* libhello 2>!; + + rm -r ./libhello; + $pkg_disfigure --keep-out libhello 2>'disfigured libhello/1.0.0'; + test -d cfg/libhello != 0 + } +} |