Skip to content

Commit cdf6cec

Browse files
committed
---
yaml --- r: 235412 b: refs/heads/stable c: 304f545 h: refs/heads/master v: v3
1 parent b4a3b94 commit cdf6cec

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 2d34a531f4ef53f19b8cd512c121dd868328b649
32+
refs/heads/stable: 304f5452749b139f518baf6fa6160b66af654223
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/src/libstd/ascii.rs

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,51 @@ mod tests {
537537
}
538538
}
539539

540+
#[test]
541+
fn test_make_ascii_lower_case() {
542+
macro_rules! test {
543+
($from: expr, $to: expr) => {
544+
{
545+
let mut x = $from;
546+
x.make_ascii_lowercase();
547+
assert_eq!(x, $to);
548+
}
549+
}
550+
}
551+
test!(b'A', b'a');
552+
test!(b'a', b'a');
553+
test!(b'!', b'!');
554+
test!('A', 'a');
555+
test!('À', 'À');
556+
test!('a', 'a');
557+
test!('!', '!');
558+
test!(b"H\xc3\x89".to_vec(), b"h\xc3\x89");
559+
test!("HİKß".to_string(), "hİKß");
560+
}
561+
562+
563+
#[test]
564+
fn test_make_ascii_upper_case() {
565+
macro_rules! test {
566+
($from: expr, $to: expr) => {
567+
{
568+
let mut x = $from;
569+
x.make_ascii_uppercase();
570+
assert_eq!(x, $to);
571+
}
572+
}
573+
}
574+
test!(b'a', b'A');
575+
test!(b'A', b'A');
576+
test!(b'!', b'!');
577+
test!('a', 'A');
578+
test!('à', 'à');
579+
test!('A', 'A');
580+
test!('!', '!');
581+
test!(b"h\xc3\xa9".to_vec(), b"H\xc3\xa9");
582+
test!("hıKß".to_string(), "HıKß");
583+
}
584+
540585
#[test]
541586
fn test_eq_ignore_ascii_case() {
542587
assert!("url()URL()uRl()Ürl".eq_ignore_ascii_case("url()url()url()Ürl"));

0 commit comments

Comments
 (0)