try gating early, add non-ascii test

This commit is contained in:
Deadbeef 2023-03-07 05:09:19 +00:00
parent 78e3455d37
commit bf3ca5979e
3 changed files with 11 additions and 1 deletions

View file

@ -0,0 +1,10 @@
// run-pass
#![feature(c_str_literals)]
fn main() {
assert_eq!(
c"\xEF\x80🦀\u{1F980}".to_bytes_with_nul(),
&[0xEF, 0x80, 0xF0, 0x9F, 0xA6, 0x80, 0xF0, 0x9F, 0xA6, 0x80, 0x00],
);
}