Skip to content

scripted test with exists #7931

@eed3si9n

Description

@eed3si9n

steps

Port plugins to sbt 2.x.

https://github.com/sbt/sbt-assembly/pull/533/files#diff-55a4d19d93a5db655a52481495f149fd5edb3bf97054607a46e31da77e29e309

problem

  > check

- $ exists target/classes/somepackage/SomeClass.class
- $ absent target/classes/shaded/SomeClass.class

  > unzip

- $ exists target/unzipped/shaded/SomeClass.class
- $ absent target/unzipped/somepackage/SomeClass.class

This is because it's currently too annoying to test this that works for both sbt 1.x and sbt 2.x

> check

$ exists target/out/jvm/scala-2.12.18/root/classes/somepackage/SomeClass.class
$ absent target/out/jvm/scala-2.12.18/root/classes/shaded/SomeClass.class

> unzip

$ exists target/out/jvm/scala-2.12.18/root/unzipped/shaded/SomeClass.class
$ absent target/out/jvm/scala-2.12.18/root/unzipped/somepackage/SomeClass.class

expectation

|| should be interpreted to be an or expression

$ exists target/unzipped/shaded/SomeClass.class || target/out/jvm/scala-2.12.18/root/classes/somepackage/SomeClass.class

* and ** should be interpreted as glob expression:

$ exists target/**/classes/somepackage/SomeClass.class

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions