Skip to content

Commit

Permalink
update naming of dev-env
Browse files Browse the repository at this point in the history
  • Loading branch information
kbjarkefur committed Jan 24, 2024
1 parent 6e0683f commit 8673e09
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 30 deletions.
20 changes: 9 additions & 11 deletions src/tests/lab_pipe/lab_pipe.do
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,27 @@
global test_fldr "${src_fldr}/tests"
global run_fldr "${test_fldr}/lab_pipe"

* Set up a dev environement for testing locally
cap mkdir "${tests}/dev-env"
repado using "${tests}/dev-env"

* Install the version of this package in
* the plus-ado folder in the test folder
cap mkdir "${test_fldr}/plus-ado"
repado , adopath("${test_fldr}/plus-ado") mode(strict)

cap net uninstall labeller
net install labeller, from("${src_fldr}") replace

* Create example data
sysuse auto, clear
label variable mpg "Mileage (%unit%)"

label variable price "Cost of car (%unit%)"

label variable foreign "Is (%country%)"

* List pipes
lbl_list_pipes, output_level(veryverbose)

* Replace a pipe
lbl_replace_pipe, pipe("%unit%") truncate(warning) ///
replacement("miles per gallon") output_level(veryverbose)

lbl_assert_no_pipes, output_level(veryverbose) ///
ignore_pipes(country)
7 changes: 3 additions & 4 deletions src/tests/lbl_no_long_varlbl.do
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ global src_fldr "${clone}/src"
global test_fldr "${src_fldr}/tests"
global data_fldr "${test_fldr}/testdata"

* Install the version of this package in
* the plus-ado folder in the test folder
cap mkdir "${test_fldr}/plus-ado"
repado , adopath("${test_fldr}/plus-ado") mode(strict)
* Set up a dev environement for testing locally
cap mkdir "${tests}/dev-env"
repado using "${tests}/dev-env"

cap net uninstall labeller
net install labeller, from("${src_fldr}") replace
Expand Down
9 changes: 4 additions & 5 deletions src/tests/test-lbl_list_matching_vals.do
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ global src_fldr "${clone}/src"
global test_fldr "${src_fldr}/tests"
global data_fldr "${test_fldr}/testdata"

* Install the version of this package in
* the plus-ado folder in the test folder
cap mkdir "${test_fldr}/plus-ado"
repado , adopath("${test_fldr}/plus-ado") mode(strict)
* Set up a dev environement for testing locally
cap mkdir "${tests}/dev-env"
repado using "${tests}/dev-env"

cap net uninstall labeller
net install labeller, from("${src_fldr}") replace
Expand Down Expand Up @@ -52,7 +51,7 @@ label values var4 var4_lbl
* Lists matching value labels and variables
* ------------------------------------------------------------------------------

* expect vars: var2 var4
* expect vars: var2 var4
* expect val lbls: var2_lbl var4_lbl
lbl_list_matching_vals, pattern("[Oo]ui")
local vars_matched = r(varlist)
Expand Down
11 changes: 5 additions & 6 deletions src/tests/test-lbl_list_matching_vars.do
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ global src_fldr "${clone}/src"
global test_fldr "${src_fldr}/tests"
global data_fldr "${test_fldr}/testdata"

* Install the version of this package in
* the plus-ado folder in the test folder
cap mkdir "${test_fldr}/plus-ado"
repado , adopath("${test_fldr}/plus-ado") mode(strict)
* Set up a dev environement for testing locally
cap mkdir "${tests}/dev-env"
repado using "${tests}/dev-env"

cap net uninstall labeller
net install labeller, from("${src_fldr}") replace
Expand All @@ -27,7 +26,7 @@ labeller
* ==============================================================================

clear

* create set of variables
gen var1 = .
gen var2 = .
Expand Down Expand Up @@ -124,4 +123,4 @@ else {
* Teardown
* ==============================================================================

drop var1 - var4
drop var1 - var4
7 changes: 3 additions & 4 deletions src/tests/test-lbl_list_no_varlbl.do
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ global src_fldr "${clone}/src"
global test_fldr "${src_fldr}/tests"
global data_fldr "${test_fldr}/testdata"

* Install the version of this package in
* the plus-ado folder in the test folder
cap mkdir "${test_fldr}/plus-ado"
repado , adopath("${test_fldr}/plus-ado") mode(strict)
* Set up a dev environement for testing locally
cap mkdir "${tests}/dev-env"
repado using "${tests}/dev-env"

cap net uninstall labeller
net install labeller, from("${src_fldr}") replace
Expand Down

0 comments on commit 8673e09

Please sign in to comment.