aboutsummaryrefslogtreecommitdiff
path: root/tests/test/script/builtin/mkdir.testscript
blob: 00fc5cf0cd95176a27a1d39d33c5d0ca01a7bd0f (plain)
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
33
34
35
36
37
38
39
40
41
# file      : tests/test/script/builtin/mkdir.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license   : MIT; see accompanying LICENSE file

.include ../common.testscript

: dir
:
{
  : cleanup
  :
  $c <<EOI && $b
    mkdir a b
    EOI

  : no-cleanup
  :
  : Also test that `--` is handled properly.
  :
  $c <<EOI && $b
    mkdir --no-cleanup -- --no-cleanup;
    rmdir -- --no-cleanup
    EOI
}

: parent
:
{
  : cleanup
  :
  $c <<EOI && $b
    mkdir -p a/b
    EOI

  : no-cleanup
  :
  $c <<EOI && $b
    mkdir -p --no-cleanup a/b;
    rm -r a
    EOI
}