Add unit tests for wxControl::SetLabelMarkup() too
Check that "&" is interpreted correctly.
This commit is contained in:
@@ -66,6 +66,16 @@ void DoTestLabel(wxControl* c)
|
|||||||
// And GetLabel() should be the escaped version of the text
|
// And GetLabel() should be the escaped version of the text
|
||||||
CHECK( l == wxControl::RemoveMnemonics(c->GetLabel()) );
|
CHECK( l == wxControl::RemoveMnemonics(c->GetLabel()) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_MARKUP
|
||||||
|
c->SetLabelMarkup("mnemonic in &markup");
|
||||||
|
CHECK( c->GetLabel() == "mnemonic in &markup" );
|
||||||
|
CHECK( c->GetLabelText() == "mnemonic in markup" );
|
||||||
|
|
||||||
|
c->SetLabelMarkup("&& finally");
|
||||||
|
CHECK( c->GetLabel() == "&& finally" );
|
||||||
|
CHECK( c->GetLabelText() == "& finally" );
|
||||||
|
#endif // wxUSE_MARKUP
|
||||||
}
|
}
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
Reference in New Issue
Block a user