Skip to content

Commit

Permalink
add parse_spc test
Browse files Browse the repository at this point in the history
  • Loading branch information
andreranza committed Jun 9, 2024
1 parent 6bf9b61 commit db231d7
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/testthat/_snaps/parse_spc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# parse_spc accounts for uppercase arguments and spec

Code
parse_spc(text)
Output
series{
title = "xyz"
start = 2014.01
period = 12
save = (A1 B1)
print = BRIEF
name = "abc"
file = "path/to/file.dat"
}

16 changes: 16 additions & 0 deletions tests/testthat/test-parse_spc.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
test_that("parse_spc accounts for uppercase arguments and spec", {

text <- '
SERIES{
TITLE = "xyz"
START = 2014.01
PERIOD = 12
SAVE = (A1 B1)
PRINT = BRIEF
NAME = "abc"
FILE = "path/to/file.dat"
}'

expect_snapshot(parse_spc(text))

})

0 comments on commit db231d7

Please sign in to comment.