File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -196,6 +196,27 @@ fn test_superscript_char_agreement() {
196196 }
197197}
198198
199+ #[ test]
200+ fn test_glyph_names_do_not_contain_underscore ( ) {
201+ // Because sup_ and sub_ use an underscore as a kind of separator,
202+ // it's probably too confusing to allow them in glyph names. So
203+ // this test prevents someone using one.
204+ //
205+ // I am currently also considering a convention in which a
206+ // combining character is specified by including the name of the
207+ // second character inside @...@. For example @square_minus@ to
208+ // denote a square (which does not advance the carriage) followed
209+ // by a minus sign (which does). This plan would require us to
210+ // treat '_' as a glyph name separator.
211+ for g in ALL_GLYPHS {
212+ assert ! (
213+ !g. name. contains( '_' ) ,
214+ "glyph name {} should not contain an underscore" ,
215+ & g. name
216+ ) ;
217+ }
218+ }
219+
199220mod shape {
200221 #![ allow( non_camel_case_types) ]
201222
You can’t perform that action at this time.
0 commit comments