From 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf Mon Sep 17 00:00:00 2001 From: takeshi_hoshina Date: Mon, 2 Nov 2020 11:07:33 +0900 Subject: basesystem-jj recipes --- external/poky/bitbake/lib/bb/tests/codeparser.py | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'external/poky/bitbake/lib/bb/tests/codeparser.py') diff --git a/external/poky/bitbake/lib/bb/tests/codeparser.py b/external/poky/bitbake/lib/bb/tests/codeparser.py index e30e78c1..826a2d2f 100644 --- a/external/poky/bitbake/lib/bb/tests/codeparser.py +++ b/external/poky/bitbake/lib/bb/tests/codeparser.py @@ -1,23 +1,10 @@ -# ex:ts=4:sw=4:sts=4:et -# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- # # BitBake Test for codeparser.py # # Copyright (C) 2010 Chris Larson # Copyright (C) 2012 Richard Purdie # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# SPDX-License-Identifier: GPL-2.0-only # import unittest @@ -123,6 +110,13 @@ ${D}${libdir}/pkgconfig/*.pc self.parseExpression("sed -i -e 's:IP{:I${:g' $pc") self.assertExecs(set(["sed"])) + def test_parameter_expansion_modifiers(self): + # - and + are also valid modifiers for parameter expansion, but are + # valid characters in bitbake variable names, so are not included here + for i in ('=', ':-', ':=', '?', ':?', ':+', '#', '%', '##', '%%'): + name = "foo%sbar" % i + self.parseExpression("${%s}" % name) + self.assertNotIn(name, self.references) def test_until(self): self.parseExpression("until false; do echo true; done") -- cgit 1.2.3-korg