Amélioration de la méthode de remplacement des variables pour gérer les références imbriquées et ajout de tests pour les variables inexistantes
This commit is contained in:
26
tests/test-29-variable-dont-exist/README.md
Normal file
26
tests/test-29-variable-dont-exist/README.md
Normal file
@@ -0,0 +1,26 @@
|
||||
en gros ici on vérifie ce qu'il se passe quand on essaye d'utiliser une variable qui n'existe pas.
|
||||
|
||||
Exemple :
|
||||
|
||||
bake =
|
||||
moncef@MacBook-Pro-de-Moncef bake % bake
|
||||
Création du fichier
|
||||
touch test.txt
|
||||
Essai de création d'un fichier avec une variable qui n'existe pas
|
||||
touch $(NOM_FICHIER2)
|
||||
sh: NOM_FICHIER2: command not found
|
||||
usage: touch [-A [-][[hh]mm]SS] [-achm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]]
|
||||
[-d YYYY-MM-DDThh:mm:SS[.frac][tz]] file ...
|
||||
bake: *** [main] Error 1
|
||||
|
||||
|
||||
make =
|
||||
|
||||
moncef@MacBook-Pro-de-Moncef make % make
|
||||
Création du fichier
|
||||
touch test.txt
|
||||
Essai de création d'un fichier avec une variable qui n'existe pas
|
||||
touch
|
||||
usage: touch [-A [-][[hh]mm]SS] [-achm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]]
|
||||
[-d YYYY-MM-DDThh:mm:SS[.frac][tz]] file ...
|
||||
make: *** [main] Error 1
|
7
tests/test-29-variable-dont-exist/bake/Bakefile
Normal file
7
tests/test-29-variable-dont-exist/bake/Bakefile
Normal file
@@ -0,0 +1,7 @@
|
||||
NOM_FICHIER = test.txt
|
||||
|
||||
main:
|
||||
@echo "Création du fichier"
|
||||
touch $(NOM_FICHIER)
|
||||
@echo "Essai de création d'un fichier avec une variable qui n'existe pas"
|
||||
touch $(NOM_FICHIER2)
|
7
tests/test-29-variable-dont-exist/make/Makefile
Normal file
7
tests/test-29-variable-dont-exist/make/Makefile
Normal file
@@ -0,0 +1,7 @@
|
||||
NOM_FICHIER = test.txt
|
||||
|
||||
main:
|
||||
@echo "Création du fichier"
|
||||
touch $(NOM_FICHIER)
|
||||
@echo "Essai de création d'un fichier avec une variable qui n'existe pas"
|
||||
touch $(NOM_FICHIER2)
|
Reference in New Issue
Block a user