Skip to content

Commit 8b16b97

Browse files
0xPoeTurbo87
authored andcommitted
Add an integration test for feature name with dot
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
1 parent dd96103 commit 8b16b97

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
@@ -25,6 +25,15 @@ fn features_version_2() {
2525
assert_json_snapshot!(crates);
2626
}
2727

28+
#[test]
29+
fn feature_name_with_dot() {
30+
let (app, _, _, token) = TestApp::full().with_token();
31+
let crate_to_publish = PublishBuilder::new("foo", "1.0.0").feature("foo.bar", &[]);
32+
token.publish_crate(crate_to_publish).good();
33+
let crates = app.crates_from_index_head("foo");
34+
assert_json_snapshot!(crates);
35+
}
36+
2837
#[test]
2938
fn invalid_feature_name() {
3039
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)