@@ -52,6 +52,9 @@ use uucore::i18n::collator::locale_cmp;
5252use uucore:: i18n:: decimal:: locale_decimal_separator;
5353use uucore:: line_ending:: LineEnding ;
5454use uucore:: parser:: num_parser:: { ExtendedParser , ExtendedParserError } ;
55+ #[ cfg( test) ]
56+ use uucore:: parser:: parse_size:: { EXA , TERA } ;
57+ use uucore:: parser:: parse_size:: { GIGA , KILO , MEGA } ;
5558use uucore:: parser:: parse_size:: { ParseSizeError , Parser } ;
5659use uucore:: parser:: shortcut_value_parser:: ShortcutValueParser ;
5760use uucore:: posix:: { MODERN , TRADITIONAL } ;
@@ -122,18 +125,6 @@ fn locale_decimal_pt() -> u8 {
122125const NEGATIVE : & u8 = & b'-' ;
123126const POSITIVE : & u8 = & b'+' ;
124127
125- // Non-breaking space constants
126- const UTF8_NBSP : & [ u8 ] = & [ 0xc2 , 0xa0 ] ; // UTF-8 encoding of non-breaking space (U+00A0)
127- const ISO_NBSP : u8 = 0xa0 ; // ISO 8859-1 non-breaking space
128-
129- // SI unit constants for byte parsing
130- const KILO : usize = 1024 ;
131- const MEGA : usize = 1024 * 1024 ;
132- const GIGA : usize = 1024 * 1024 * 1024 ;
133- const TERA : usize = 1024 * 1024 * 1024 * 1024 ;
134- const PETA : usize = 1024 * 1024 * 1024 * 1024 * 1024 ;
135- const EXA : usize = 1024 * 1024 * 1024 * 1024 * 1024 * 1024 ;
136-
137128// The automatic buffer heuristics clamp to this range to avoid
138129// over-committing memory on constrained systems while still keeping
139130// reasonably large chunks for typical workloads.
@@ -3207,7 +3198,7 @@ mod tests {
32073198 ( "1b" , 1 ) ,
32083199 ( "1024b" , KILO ) ,
32093200 ( "1024Mb" , KILO * MEGA ) , // NOTE: This might not be how GNU `sort` behaves for 'Mb'
3210- ( "1" , KILO ) , // K is default
3201+ ( "1" , KILO ) , // K is default
32113202 ( "50" , 50 * KILO ) ,
32123203 ( "K" , KILO ) ,
32133204 ( "k" , KILO ) ,
0 commit comments