Skip to content

Commit 3eb8107

Browse files
committed
Add an integration test for feature name with dot
Signed-off-by: hi-rustin <[email protected]>
1 parent ddeedb9 commit 3eb8107

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

src/tests/krate/publish/features.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ fn features_version_2() {
2424
assert_json_snapshot!(crates);
2525
}
2626

27+
#[test]
28+
fn feature_name_with_dot() {
29+
let (app, _, _, token) = TestApp::full().with_token();
30+
let crate_to_publish = PublishBuilder::new("foo", "1.0.0").feature("foo.bar", &[]);
31+
token.publish_crate(crate_to_publish).good();
32+
let crates = app.crates_from_index_head("foo");
33+
assert_json_snapshot!(crates);
34+
}
35+
2736
#[test]
2837
fn invalid_feature_name() {
2938
let (app, _, _, token) = TestApp::full().with_token();
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
source: src/tests/krate/publish/features.rs
3+
expression: crates
4+
---
5+
[
6+
{
7+
"name": "foo",
8+
"vers": "1.0.0",
9+
"deps": [],
10+
"cksum": "d0bfdbcd4905a15b3dc6db5ce23e206ac413b4d780053fd38e145a75197fb1e1",
11+
"features": {
12+
"foo.bar": []
13+
},
14+
"yanked": false
15+
}
16+
]

0 commit comments

Comments
 (0)