Add test for enum variant value display
This commit is contained in:
parent
a576dfd0c6
commit
4a64c796ee
1 changed files with 15 additions and 0 deletions
15
tests/rustdoc/enum-variant-value.rs
Normal file
15
tests/rustdoc/enum-variant-value.rs
Normal file
|
@ -0,0 +1,15 @@
|
|||
// This test ensures that the variant value is displayed with underscores but without
|
||||
// a type name at the end.
|
||||
|
||||
#![crate_name = "foo"]
|
||||
|
||||
// @has 'foo/enum.B.html'
|
||||
// @has - '//*[@class="rust item-decl"]/code' 'A = 12,'
|
||||
// @has - '//*[@class="rust item-decl"]/code' 'C = 1_245,'
|
||||
// @matches - '//*[@id="variant.A"]/h3' '^A = 12$'
|
||||
// @matches - '//*[@id="variant.C"]/h3' '^C = 1_245$'
|
||||
pub enum B {
|
||||
A = 12,
|
||||
B,
|
||||
C = 1245,
|
||||
}
|
Loading…
Add table
Reference in a new issue