Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing tests for @lib #111

Closed
xonixx opened this issue Aug 20, 2022 · 1 comment
Closed

Add missing tests for @lib #111

xonixx opened this issue Aug 20, 2022 · 1 comment
Assignees
Milestone

Comments

@xonixx
Copy link
Owner

xonixx commented Aug 20, 2022

image

@xonixx xonixx added this to the PLANNED milestone Aug 20, 2022
@xonixx xonixx self-assigned this Aug 20, 2022
xonixx added a commit that referenced this issue Sep 3, 2022
@xonixx
Copy link
Owner Author

xonixx commented Sep 3, 2022

Actually this reveals a bug in @goal @glob + @lib combination. The glob-exported variables are not available in lib:

@lib
  echo "Unnamed lib ::: $ITEM :: $INDEX :: $TOTAL"

@goal @glob 11_goal_glob*.txt
@use_lib
  echo "@glob       ::: $ITEM :: $INDEX :: $TOTAL"

@goal glob_goal_name @glob 11_goal_glob*.txt
@use_lib lib_name
  echo "glob_goal_name ::: $ITEM :: $INDEX :: $TOTAL"

@lib lib_name
  echo "lib lib_name   ::: $ITEM :: $INDEX :: $TOTAL"

Outputs:

$ ./makesure -f tests/11_goal_glob_lib.sh '11_goal_glob*.txt'
  goal '11_goal_glob_1.txt' ...
Unnamed lib :::  ::  :: 
@glob       ::: 11_goal_glob_1.txt :: 0 :: 4
  goal '11_goal_glob_2.txt' ...
Unnamed lib :::  ::  :: 
@glob       ::: 11_goal_glob_2.txt :: 1 :: 4
  goal '11_goal_glob_3.txt' ...
Unnamed lib :::  ::  :: 
@glob       ::: 11_goal_glob_3.txt :: 2 :: 4
  goal '11_goal_glob_10.txt' ...
Unnamed lib :::  ::  :: 
@glob       ::: 11_goal_glob_10.txt :: 3 :: 4
  goal '11_goal_glob*.txt' [empty].

xonixx added a commit that referenced this issue Sep 3, 2022
@xonixx xonixx closed this as completed Sep 3, 2022
@xonixx xonixx modified the milestones: PLANNED, 0.9.19 Sep 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant