1# This file is part of xenv -*- autotest -*- 2# Copyright (C) 2021 Sergey Poznyakoff 3# 4# Xenv is free software; you can redistribute it and/or modify it 5# under the terms of the GNU General Public License as published by the 6# Free Software Foundation; either version 3 of the License, or (at your 7# option) any later version. 8# 9# Xenv is distributed in the hope that it will be useful, 10# but WITHOUT ANY WARRANTY; without even the implied warranty of 11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12# GNU General Public License for more details. 13# 14# You should have received a copy of the GNU General Public License along 15# with xenv. If not, see <http://www.gnu.org/licenses/>. */ 16 17AT_SETUP([Brace expansion]) 18AT_DATA([input], 19[foo is ${X_FOO}, bar is ${X_BAR}. 20]) 21AT_CHECK([ 22unset X_FOO 23unset X_BAR 24xenv input], 25[0], 26[foo is , bar is . 27]) 28AT_CHECK([ 29unset X_FOO 30unset X_BAR 31xenv -u input], 32[65], 33[foo is , bar is . 34], 35[input:1: variable X_FOO not defined 36input:1: variable X_BAR not defined 37]) 38AT_CHECK([ 39unset X_FOO 40unset X_BAR 41xenv -ur input], 42[65], 43[foo is ${X_FOO}, bar is ${X_BAR}. 44], 45[input:1: variable X_FOO not defined 46input:1: variable X_BAR not defined 47]) 48AT_CHECK([ 49X_FOO=baz X_BAR=qux xenv -u input], 50[0], 51[foo is baz, bar is qux. 52]) 53 54AT_CLEANUP