;Fix rewrite tests after #457 fix

As a consequence of fixing #457, two rewrite tests fail, because extra
quotes appear in the output of the commands being tested.

These quotes appear in comments which reflect the command which was
run in order to produce the output. Instead of

   ; generated-posting: = assets:bank and amt:<0

we now get

   ; generated-posting: = assets:bank and "amt:<0"

Given that the quotes around `amt:<0` are necessary for the command to
work properly, these quotes should really be there in the expected
output.

Hence this commit modifies the expected output of the tests, by adding
in the quotes. This makes the tests pass once more.
This commit is contained in:
Jacek Generowicz 2019-11-30 19:21:23 +01:00
parent c6da152e9a
commit 24fbe313dd

View File

@ -142,14 +142,14 @@ hledger rewrite -f- assets:bank and 'amt:<0' --add-posting 'expenses:fee $5' -
2016/01/01 withdraw ; modified:
assets:cash $20
assets:bank
expenses:fee $5 ; generated-posting: = assets:bank and amt:<0
assets:bank $-5 ; generated-posting: = assets:bank and amt:<0
expenses:fee $5 ; generated-posting: = assets:bank and "amt:<0"
assets:bank $-5 ; generated-posting: = assets:bank and "amt:<0"
2016/01/02 withdraw ; modified:
assets:cash
assets:bank $-30
expenses:fee $5 ; generated-posting: = assets:bank and amt:<0
assets:bank $-5 ; generated-posting: = assets:bank and amt:<0
expenses:fee $5 ; generated-posting: = assets:bank and "amt:<0"
assets:bank $-5 ; generated-posting: = assets:bank and "amt:<0"
>>>2
>>>=0
@ -240,14 +240,14 @@ hledger rewrite --diff -f- assets:bank and 'amt:<0' --add-posting 'expenses:fee
+2016/01/01 withdraw ; modified:
assets:cash $20
assets:bank
+ expenses:fee $5 ; generated-posting: = assets:bank and amt:<0
+ assets:bank $-5 ; generated-posting: = assets:bank and amt:<0
+ expenses:fee $5 ; generated-posting: = assets:bank and "amt:<0"
+ assets:bank $-5 ; generated-posting: = assets:bank and "amt:<0"
@@ -5,3 +7,5 @@
-2016/01/02 withdraw
+2016/01/02 withdraw ; modified:
assets:cash
assets:bank $-30
+ expenses:fee $5 ; generated-posting: = assets:bank and amt:<0
+ assets:bank $-5 ; generated-posting: = assets:bank and amt:<0
+ expenses:fee $5 ; generated-posting: = assets:bank and "amt:<0"
+ assets:bank $-5 ; generated-posting: = assets:bank and "amt:<0"
>>>2
>>>=0