Skip to content
Snippets Groups Projects
test_pbuilder-checkparams 890 B
Newer Older
  • Learn to ignore specific revisions
  • #!/bin/bash
    
    # testsuite for pbuilder-checkparams
    
    
    TD="$(dirname "$0")"
    
    Mattia Rizzolo's avatar
    Mattia Rizzolo committed
    . "$TD/testlib.sh"
    
    if [ -n "$PBUILDER_CHECKOUT" ]; then
    
        PBUILDER_CHECKPARAMS="$PBUILDER_CHECKOUT/pbuilder-checkparams"
    
        PBUILDER_CHECKPARAMS="$PBUILDER_TEST_PKGLIBDIR/pbuilder-checkparams"
    
    
    # setup a fake installed environment
    trap testlib_cleanup_env sigpipe sighup exit
    testlib_setup_env
    
    
    test_debuildopts() {
        . "$PBUILDER_CHECKPARAMS"
        echo "$DEBBUILDOPTS"
    }
    
    
    expect_output "" \
        test_debuildopts foo.dsc
    expect_output "" \
        test_debuildopts --debbuildopts "" foo.dsc
    
    expect_output "-v1.0 -efoo" \
    
        test_debuildopts --debbuildopts "-v1.0 -efoo" foo.dsc
    
    expect_output "-v1.0 -efoo" \
    
        test_debuildopts --debbuildopts -v1.0 --debbuildopts -efoo foo.dsc
    
    expect_output "-efoo" \
    
        test_debuildopts --debbuildopts -v1.0 --debbuildopts "" --debbuildopts -efoo foo.dsc
    
    testlib_summary