File: post_any_expr.test

package info (click to toggle)
ledger 3.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,964 kB
  • sloc: cpp: 39,393; python: 4,476; perl: 1,309; sh: 477; lisp: 435; yacc: 103; makefile: 58
file content (56 lines) | stat: -rw-r--r-- 1,380 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
2023/01/01 * Payment
    Expenses:Books                $200.00
    Liabilities:MasterCard
2023/01/01 * Payment
    Expenses:Books                $100.00
    Liabilities:Visa

test bal expr "false"
end test

test bal expr "true"
             $300.00  Expenses:Books
            $-300.00  Liabilities
            $-200.00    MasterCard
            $-100.00    Visa
--------------------
                   0
end test

test bal expr "post.any(account =~ /MasterCard/)"
             $200.00  Expenses:Books
            $-200.00  Liabilities:MasterCard
--------------------
                   0
end test

test bal expr "post.all(account =~ /MasterCard/)"
end test

test bal expr "post.any(account =~ /MasterCard/)"
             $200.00  Expenses:Books
            $-200.00  Liabilities:MasterCard
--------------------
                   0
end test

test bal expr "post.all(account !~ /MasterCard/)"
             $100.00  Expenses:Books
            $-100.00  Liabilities:Visa
--------------------
                   0
end test

test bal expr "post.all(account =~ /MasterCard/, true)"
end test

test bal expr "post.any(account =~ /MasterCard/, true)"
             $200.00  Expenses:Books
            $-200.00  Liabilities:MasterCard
--------------------
                   0
end test

test bal expr "post.all(account =~ /MasterCard/, false)"
             $200.00  Expenses:Books
end test