#!/usr/bin/env bats load test_helpers source $(dirname $BATS_TEST_DIRNAME)/lib/commands/plugin-list-all.sh proc setup { setup_asdf_dir setup_repo } proc teardown { clean_asdf_dir } @test "plugin_list_all list all plugins in the repository" { run plugin_list_all_command var expected = '"bar foo'" test $status -eq 0 test $output = $expected } (CommandList children: [ (C {(load)} {(test_helpers)}) (C {(.)} { (CommandSubPart command_list: (CommandList children:[(C {(dirname)} {($ VSub_Name "$BATS_TEST_DIRNAME")})]) left_token: spids: [11 15] ) (/lib/commands/plugin-list-all.sh) } ) (FuncDef name: setup body: (BraceGroup children:[(C {(setup_asdf_dir)})(C {(setup_repo)})] spids:[23]) spids: [19 22] ) (FuncDef name: teardown body: (BraceGroup children:[(C {(clean_asdf_dir)})] spids:[38]) spids: [34 37] ) (C {(Lit_Other "@") (test)} {(DQ ("plugin_list_all list all plugins in the repository"))} {(Lit_LBrace "{")} ) (C {(run)} {(plugin_list_all_command)}) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:expected) op: Equal rhs: {(DQ ("bar\n") (foo))} spids: [63] ) ] spids: [61] ) (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$status"))} {(-eq)} {(0)} {(Lit_Other "]")}) (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$output"))} {(Lit_Other "=")} {(DQ ($ VSub_Name "$expected"))} {(Lit_Other "]")} ) ] )