/
niceSOFT
/
make
Обзор
Документация
Войти
/
niceSOFT
/
make
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
4.4
tests/scripts/variables/negative
60 строк
2 KB
Paul Smith
Add support for the POSIX :::= assignment operator.
20 сен 2021, 07:29
20 сен 2021, 07:29
6c06c54
Код
Авторство
О чём код?
# -*-perl-*- $description = "Run some negative tests (things that should fail)."; # TEST #0 # Check that non-terminated variable references are detected (and # reported using the best filename/lineno info run_make_test(' foo = bar x = $(foo y = $x all: ; @echo $y ', '', '#MAKEFILE#:3: *** unterminated variable reference. Stop.', 512); # TEST #1 # Bogus variable value passed on the command line. run_make_test(undef, ['x=$(other'], '#MAKEFILE#:4: *** unterminated variable reference. Stop.', 512); # TEST #2 # Again, but this time while reading the makefile. run_make_test(' foo = bar x = $(foo y = $x z := $y all: ; @echo $y ', '', '#MAKEFILE#:3: *** unterminated variable reference. Stop.', 512); # TEST #3 # Bogus variable value passed on the command line. run_make_test(undef, ['x=$(other'], '#MAKEFILE#:4: *** unterminated variable reference. Stop.', 512); # Whitespace not allowed in variable names run_make_test('x y =', '', '#MAKEFILE#:1: *** missing separator. Stop.', 512); run_make_test('x y=', '', '#MAKEFILE#:1: *** missing separator. Stop.', 512); # In theory an empty variable should be ignored, but during parsing it's a # real token and so this fails. I'm not 100% sure if this is right or not. run_make_test('x $X=', '', '#MAKEFILE#:1: *** missing separator. Stop.', 512); 1;