Commit 2b1394e6 authored by Sigbjørn Revheim's avatar Sigbjørn Revheim
Browse files

Rewrote test for egen fill to parse a stata command string insted of calling internal function

parent 25283314
......@@ -334,8 +334,7 @@
(deftest egen-fill-test
(is
(=
(egen-fill "somevar" {:Values '(1 2 3)} nil)
(= (parse-and-transform "egen somevar=fill(1 2 3/5 8 10 to 12)")
'{"$type" "Compute"
:Command "compute"
:Variable {"$type" "VariableSymbolExpression"
......@@ -349,8 +348,14 @@
:Value 1}
{"$type" "NumericConstantExpression"
:Value 2}
{"$type" "NumericConstantExpression"
:Value 3})}})}
{"$type" "NumberRangeExpression"
:NumberRangeStart 3
:NumberRangeEnd 5
:NumberRangeIncrement 1}
{"$type" "NumberRangeExpression"
:NumberRangeStart 8
:NumberRangeEnd 12
:NumberRangeIncrement 2})}})}
:Condition nil
:mod-varlist ["somevar"]}
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment