Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Added tests checking runtime handling of negative aliases. |
---|---|
Timelines: | family | ancestors | descendants | both | neg-aliases |
Files: | files | file ages | folders |
SHA1: |
af44ad25816b4b8196e2d9b66effe539 |
User & Date: | aku 2015-05-12 21:53:51.501 |
Context
2015-05-12
| ||
22:02 | Added docs for negative aliases. Closed-Leaf check-in: 21b94c7e50 user: aku tags: neg-aliases | |
21:53 | Added tests checking runtime handling of negative aliases. check-in: af44ad2581 user: aku tags: neg-aliases | |
2015-05-11
| ||
23:02 | Update expected test results. check-in: 5299cd1353 user: aku tags: neg-aliases | |
Changes
Changes to tests/runtime.tests.
︙ | ︙ | |||
618 619 620 621 622 623 624 625 626 627 628 | test cmdr-runtime-7.2 {validation errors} -body { ParseFailParse { input A - { validate integer } input B - { validate integer } } 1 X } -returnCodes error \ -result {Expected an integer for input "B", got "X"} # # ## ### ##### ######## ############# ##################### return | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 | test cmdr-runtime-7.2 {validation errors} -body { ParseFailParse { input A - { validate integer } input B - { validate integer } } 1 X } -returnCodes error \ -result {Expected an integer for input "B", got "X"} # # ## ### ##### ######## ############# ##################### ## Options, negative aliases test cmdr-runtime-8.0 {options, simple, boolean, special forms II} -body { Parse { option A - option B - option C - option D - option E - option F - option G - { validate identity } } -A -G=X --no-B -G=X -C=1 -D=0 --no-E=1 --no-F=0 } -result { A = 'yes' v'1' B = '0' v'0' C = '1' v'1' D = '0' v'0' E = '0' v'0' F = '1' v'1' G = 'X' v'X' } test cmdr-runtime-8.1 {options, boolean, aliases} -body { Parse { option A - { alias X } option B - { neg-alias Y } } -X -Y } -result { A = 'yes' v'1' B = '0' v'0' } test cmdr-runtime-8.2 {options, boolean, aliases, special forms} -body { Parse { option A - { alias X } option B - { neg-alias Y } } -X=0 -Y=0 } -result { A = '0' v'0' B = '1' v'1' } # # ## ### ##### ######## ############# ##################### return |