You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-B0 shouldn't panic. I think this should win some kind of "panic golf" :)
1000 and kb and 1024 and k should result in different output, but parse_size_u64 causes information loss (i.e. does not return whether a multiplier was used).
0b11 should be accepted (and interpreted as 3), but determine_number_system does not recognize that prefix.
I think I'll fix this myself soon-ish, but wanted to documented it first, in case I forget about it.
The text was updated successfully, but these errors were encountered:
BLOCK_SIZE=' 10' du --apparent-size README.md # 10
BLOCK_SIZE='10garbage' du --apparent-size README.md # 3G
BLOCK_SIZE='10MB' du --apparent-size README.md # 10MB
BLOCK_SIZE='10mB' du --apparent-size README.md # 10MB
BLOCK_SIZE='10mb' du --apparent-size README.md # 10MB
du --apparent-size -B 10KB README.md # 10KB
du --apparent-size -B 10kB README.md # 10KB
du --apparent-size -B 10MB README.md # 10MB
du --apparent-size -B 10mB README.md # 10MB
du --apparent-size -B 10mb README.md # error (sigh)
BLOCK_SIZE='10mib' du --apparent-size README.md # 10M
du --apparent-size -B 10mib README.md # error (sigh)
BLOCK_SIZE='10PiB' du --apparent-size README.md # 10P
BLOCK_SIZE='10piB' du --apparent-size README.md # 10 (lol)
du --apparent-size -B 10PiB README.md # 10P
du --apparent-size -B 10piB README.md # error
BLOCK_SIZE=' 10' du --apparent-size README.md # leading space should be trimmed
BLOCK_SIZE=$'\v10' du --apparent-size README.md # leading space should be trimmed, even though trim_ascii doesn't recognize it
BLOCK_SIZE=$'\xc2\xa03' du --apparent-size README.md # leading space should NOT be trimmed, even though trim_start would remove it
BLOCK_SIZE='3garbage' du --apparent-size README.md # 3g
BLOCK_SIZE='99999999TB' du --apparent-size README.md # Saturates!
dd if=/dev/zero of=/dev/null count=1 $'bs=\v10' # allows whitespace
dd if=/dev/zero of=/dev/null count=1 bs=0 # shouldn't crash (sigh)
dd if=/dev/zero of=/dev/null count=0b100 bs=1 # Doesn't support binary!
-B0
shouldn't panic. I think this should win some kind of "panic golf" :)1000
andkb
and1024
andk
should result in different output, butparse_size_u64
causes information loss (i.e. does not return whether a multiplier was used).0b11
should be accepted (and interpreted as 3), butdetermine_number_system
does not recognize that prefix.I think I'll fix this myself soon-ish, but wanted to documented it first, in case I forget about it.
The text was updated successfully, but these errors were encountered: