@@ -540,13 +540,13 @@ def test_normalize_wrap(self):
540540 data = normalize (raw , 'UTF-8' , 'msgid' , 30 )
541541 self .assertEqual (expected , data )
542542
543- def test_normalize_nostr (self ):
543+ def test_normalize_empty_str (self ):
544544 data = normalize ('' , 'UTF-8' , 'msgid' , 30 )
545545 self .assertEqual ('""' , data )
546546
547547 def test_normalize_single_word (self ):
548548 for s in ("fee" , "fi" , "fo" , "fums" ):
549- data = normalize (s , 'UTF-8' , 'msgid' , 3 )
549+ data = normalize (s , 'UTF-8' , 'msgid' , 8 )
550550 self .assertNotIn ('""' , data ) # did not wrap
551551
552552 def test_normalize_split_on_whitespace (self ):
@@ -557,6 +557,11 @@ def test_normalize_split_on_whitespace(self):
557557 data = normalize (s , 'UTF-8' , 'msgid' , 10 )
558558 self .assertEqual (s_expected , data )
559559
560+ s = f'longlonglong\r \n word'
561+ s_expected = f'""\n "longlonglong\\ r\\ n"\n "word"'
562+ data = normalize (s , 'UTF-8' , 'msgid' , 30 )
563+ self .assertEqual (s_expected , data )
564+
560565
561566def extract_from_snapshots ():
562567 snapshots = {
0 commit comments