Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(inline): Fail update on conflict #347

Merged
merged 4 commits into from
Jul 10, 2024
Merged

fix(inline): Fail update on conflict #347

merged 4 commits into from
Jul 10, 2024

Conversation

epage
Copy link
Contributor

@epage epage commented Jul 10, 2024

Fixes #345

@epage
Copy link
Contributor Author

epage commented Jul 10, 2024

I want to try this out on Cargo before merging

@epage epage marked this pull request as draft July 10, 2024 02:49
@coveralls
Copy link

Pull Request Test Coverage Report for Build 9867375936

Details

  • 14 of 19 (73.68%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 51.796%

Changes Missing Coverage Covered Lines Changed/Added Lines %
crates/snapbox/src/data/runtime.rs 14 15 93.33%
crates/snapbox/src/assert/mod.rs 0 4 0.0%
Totals Coverage Status
Change from base Build 9860440727: 0.1%
Covered Lines: 1399
Relevant Lines: 2701

💛 - Coveralls

@epage epage marked this pull request as ready for review July 10, 2024 03:08
@epage
Copy link
Contributor Author

epage commented Jul 10, 2024

Verified on cargo

before

--- i/tests/testsuite/alt_registry.rs
+++ w/tests/testsuite/alt_registry.rs
@@ -1727,10 +1727,18 @@ fn both_index_and_registry() {
             .with_stderr_data(str![[r#"
 [ERROR] the argument '--registry <REGISTRY>' cannot be used with '--index <INDEX>'

-Usage: foo
+Usage: cargo yank --version <VERSION> --registry <REGISTRY> [CRATE]

 For more information, try '--help'.

+"#]
+
+For more information, try '--help'.
+
+"#]r more information, try '--help'.
+
+"#] information, try '--help'.
+
 "#]])
             .run();
     }

after

-- i/tests/testsuite/alt_registry.rs
+++ w/tests/testsuite/alt_registry.rs
@@ -1727,7 +1727,7 @@ fn both_index_and_registry() {
             .with_stderr_data(str![[r#"
 [ERROR] the argument '--registry <REGISTRY>' cannot be used with '--index <INDEX>'

-Usage: foo
+Usage: cargo publish --registry <REGISTRY>

 For more information, try '--help'.
running 1 test
Fixing:
---- expected: tests/testsuite/alt_registry.rs:1727:31
++++ actual:   stderr
   1    1 | [ERROR] the argument '--registry <REGISTRY>' cannot be used with '--index <INDEX>'
   2    2 |
   3      - Usage: foo
        3 + Usage: cargo publish --registry <REGISTRY>
   4    4 |
   5    5 | For more information, try '--help'.


test alt_registry::both_index_and_registry ... FAILED

failures:

---- alt_registry::both_index_and_registry stdout ----
running `/home/epage/src/personal/cargo/target/debug/cargo publish --registry=foo --index=foo`
running `/home/epage/src/personal/cargo/target/debug/cargo owner --registry=foo --index=foo`
thread 'alt_registry::both_index_and_registry' panicked at tests/testsuite/alt_registry.rs:1735:14:

---- expected: tests/testsuite/alt_registry.rs:1727:31
++++ actual:   stderr
   1    1 | [ERROR] the argument '--registry <REGISTRY>' cannot be used with '--index <INDEX>'
   2    2 |
   3      - Usage: foo
        3 + Usage: cargo owner --registry <REGISTRY> [CRATE]
   4    4 |
   5    5 | For more information, try '--help'.

Update failed: cannot update as it was already modified

@epage epage merged commit e836f9e into assert-rs:main Jul 10, 2024
14 of 15 checks passed
@epage epage deleted the parallel branch July 10, 2024 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Snapbox updated the same inline snapshots shared between different tests
2 participants