r-hyperspec / hySpc.read.txt

Import ASCII formatted data into hyperSpec
https://r-hyperspec.github.io/hySpc.read.txt/
MIT License
0 stars 1 forks source link

features/75-WITec-unittest #82

Closed sangttruong closed 2 years ago

sangttruong commented 2 years ago

Resolve #75

GegznaV commented 2 years ago

@sangttruong, were the old unit tests removed and only new ones based on #55 added? Or both old and new unit tests are kept in this PR?

GegznaV commented 2 years ago

@sangttruong wrote:

Here is the block that I use to read the file

  header <- system.file(
    "extdata",
    "txt.Witec/nofilename_Header.txt",
    package = "hySpc.read.txt"
  )

  filex <- system.file(
    "extdata",
    "txt.Witec/nofilename_X-Axis.txt",
    package = "hySpc.read.txt"
  )

  filey <- system.file(
    "extdata",
    "txt.Witec/nofilename_Y-Axis.txt",
    package = "hySpc.read.txt"
  )
  expect_silent(spc <- read_txt_WITec_Graph(header, filex, filey))

It keeps throwing this cryptic error: Error in lapply(tmp, as.numeric) : invalid multibyte string at '<8d><96><88>m'

It's the last commit on reading .txt if you would like to take a look. The old unit test (which I commented out at the bottom doesn't return an error)

I do not have time to look into this now. @cbeleites, can you help?