120 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			120 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
# just check
 | 
						|
hledger -f - bal --no-total
 | 
						|
<<<
 | 
						|
D $1,000.00
 | 
						|
 | 
						|
2018/1/1
 | 
						|
   (a)  2.3
 | 
						|
>>>
 | 
						|
               $2.30  a
 | 
						|
>>>=0
 | 
						|
 | 
						|
# some basic cases with commodity
 | 
						|
hledger -f - bal --no-total
 | 
						|
<<<
 | 
						|
commodity $1,000.00000000
 | 
						|
 | 
						|
2018/1/1
 | 
						|
   a  $1.05e2
 | 
						|
   b  $31415926e-7
 | 
						|
   c  $1E+3
 | 
						|
   d
 | 
						|
>>>
 | 
						|
       $105.00000000  a
 | 
						|
         $3.14159260  b
 | 
						|
     $1,000.00000000  c
 | 
						|
    $-1,108.14159260  d
 | 
						|
>>>=0
 | 
						|
 | 
						|
# some basic cases with commodity
 | 
						|
hledger -f - print --explicit
 | 
						|
<<<
 | 
						|
commodity $1,000.00000000
 | 
						|
 | 
						|
2018/1/1
 | 
						|
   a  $1.05e2
 | 
						|
   b  $31415926e-7
 | 
						|
   c  $1E+3
 | 
						|
   d
 | 
						|
>>>
 | 
						|
2018/01/01
 | 
						|
    a       $105.00000000
 | 
						|
    b         $3.14159260
 | 
						|
    c     $1,000.00000000
 | 
						|
    d    $-1,108.14159260
 | 
						|
 | 
						|
>>>=0
 | 
						|
#
 | 
						|
# some basic cases
 | 
						|
hledger -f - bal --no-total
 | 
						|
<<<
 | 
						|
2018/1/1
 | 
						|
   a  1.05e2
 | 
						|
   b  31415926e-7
 | 
						|
   c  1E+3
 | 
						|
   d
 | 
						|
>>>
 | 
						|
         105.0000000  a
 | 
						|
           3.1415926  b
 | 
						|
        1000.0000000  c
 | 
						|
       -1108.1415926  d
 | 
						|
>>>2
 | 
						|
>>>=0
 | 
						|
 | 
						|
# we still should recognize commodities with e
 | 
						|
hledger -f - bal --no-total
 | 
						|
<<<
 | 
						|
2018/1/1
 | 
						|
   (a)  1.00005e
 | 
						|
   (a)  2.00003E
 | 
						|
>>>
 | 
						|
            2.00003E   
 | 
						|
            1.00005e  a
 | 
						|
>>>=0
 | 
						|
 | 
						|
hledger -f - reg
 | 
						|
<<<
 | 
						|
2018/1/1
 | 
						|
   (a)  1,000.5e-1
 | 
						|
>>>
 | 
						|
>>>=1
 | 
						|
 | 
						|
# different digit group separator chars before and after decimal point, not supported
 | 
						|
# 2018/1/4
 | 
						|
#     (d)  1,000,000.123 456 789
 | 
						|
 | 
						|
# same digit group separator chars after decimal point - not supported
 | 
						|
# 2018/1/4
 | 
						|
#     (d)  1,000,000.123,456,789
 | 
						|
 | 
						|
# space digit group separator
 | 
						|
# 2018/1/1
 | 
						|
#   (a)   1 999 999.9455
 | 
						|
 | 
						|
# scientific E-notation, with a commodity symbol
 | 
						|
# 2018/1/2
 | 
						|
#   (b)   $1E+3
 | 
						|
 | 
						|
# non-normalised E-notation
 | 
						|
# 2018/1/1
 | 
						|
#   (a)   123E+3
 | 
						|
 | 
						|
# E-notation with digit group separator - not supported
 | 
						|
# 2018/1/3
 | 
						|
#   (c)   1,000.5e-1
 | 
						|
 | 
						|
# E-notation with only a digit group separator - parsed as decimal point
 | 
						|
# 2018/1/1
 | 
						|
#   (a)   $1,000e1
 | 
						|
 | 
						|
# E-notation with only a digit group separator, identified as such by commodity declaration - detected and rejected
 | 
						|
# commodity $1,000.00
 | 
						|
# 2018/1/1
 | 
						|
#   (a)   $1,000e1
 | 
						|
 | 
						|
# E-notation with only a digit group separator, amount style implied - parsed as decimal point
 | 
						|
# 2018/1/1
 | 
						|
#   (a)   $1,000.00
 | 
						|
# 2018/1/1
 | 
						|
#   (a)   $1,000e3  ; should be parsed as 1000000
 |