Eliminate env_push and env_pop

This commit is contained in:
ridiculousfish
2018-09-10 18:59:57 -07:00
parent 94adb53b1f
commit 5055621e02
5 changed files with 31 additions and 37 deletions

View File

@@ -1755,7 +1755,8 @@ static void test_ifind_fuzzy() {
static void test_abbreviations() {
say(L"Testing abbreviations");
env_push(true);
auto &vars = parser_t::principal_parser().vars();
vars.push(true);
const std::vector<std::pair<const wcstring, const wcstring>> abbreviations = {
{L"gc", L"git checkout"},
@@ -1822,7 +1823,7 @@ static void test_abbreviations() {
expanded = reader_expand_abbreviation_in_command(L"command gc", wcslen(L"command gc"), &result);
if (expanded) err(L"gc incorrectly expanded on line %ld", (long)__LINE__);
env_pop();
vars.pop();
}
/// Test path functions.