Skip to content

Commit 4587d80

Browse files
committed
---
yaml --- r: 13218 b: refs/heads/master c: 0746190 h: refs/heads/master v: v3
1 parent 89e709f commit 4587d80

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 94ac30c498399eec1c5239b472845d238b1926ec
2+
refs/heads/master: 07461908268c9901dcd7a6ded109733fac4c86c6
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/src/cargo/cargo.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,16 @@ fn is_uuid(id: str) -> bool {
134134
false
135135
}
136136

137+
#[test]
138+
fn test_is_uuid() {
139+
assert is_uuid("aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa");
140+
assert is_uuid("AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA");
141+
assert is_uuid("0AAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAA0");
142+
assert !is_uuid("aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa");
143+
assert !is_uuid("aaaaaaaa-aaaa-aaaa-aaaaa-aaaaaaaaaaaa");
144+
assert !is_uuid("");
145+
}
146+
137147
// FIXME: implement URI/URL parsing so we don't have to resort to weak checks
138148

139149
fn is_archive_uri(uri: str) -> bool {

0 commit comments

Comments
 (0)