-
Notifications
You must be signed in to change notification settings - Fork 414
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4100 from rgrinberg/cram-package
Allow [package] on cram stanza
- Loading branch information
Showing
11 changed files
with
123 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
We can attach cram tests to packages | ||
|
||
This sub dir is needed because we are runnning cram inside and cram, and we | ||
don't want our own test file to be visible. | ||
$ mkdir subdir | ||
$ cd subdir | ||
|
||
$ cat >dune-project <<EOF | ||
> (lang dune 2.8) | ||
> (cram enable) | ||
> (package (name foo)) | ||
> (package (name bar)) | ||
> EOF | ||
|
||
$ cat >dune <<EOF | ||
> (cram | ||
> (applies_to foo) | ||
> (package foo)) | ||
> (cram | ||
> (applies_to bar) | ||
> (package bar)) | ||
> EOF | ||
|
||
$ cat >foo.t <<EOF | ||
> $ echo foo | ||
> EOF | ||
|
||
$ cat >bar.t <<EOF | ||
> $ echo bar | ||
> EOF | ||
|
||
$ dune build @runtest --only-packages foo | ||
File "foo.t", line 1, characters 0-0: | ||
Error: Files _build/default/foo.t and _build/default/foo.t.corrected differ. | ||
[1] | ||
|
||
$ dune promote foo.t | ||
Promoting _build/default/foo.t.corrected to foo.t. | ||
|
||
|
||
$ dune build @runtest --only-packages bar | ||
File "bar.t", line 1, characters 0-0: | ||
Error: Files _build/default/bar.t and _build/default/bar.t.corrected differ. | ||
[1] | ||
|
||
$ dune promote bar.t | ||
Promoting _build/default/bar.t.corrected to bar.t. |