Skip to content

Commit

Permalink
Merge pull request #2048 from AllenInstitute/bugfix/2048-fix_loaddata…
Browse files Browse the repository at this point in the history
…wrapper

AB: bugfix LoadDataWrapper excluded loaded waves if the casing was di…
  • Loading branch information
t-b authored Mar 12, 2024
2 parents 150ab94 + 49fbb29 commit 32da968
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Packages/MIES/MIES_AnalysisBrowser.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ static Function AB_LoadDataWrapper(tmpDFR, expFilePath, datafolderPath, listOfNa

RemoveAllEmptyDataFolders(tmpDFR)

regexp = ConvertListToRegexpWithAlternations(listOfNames)
regexp = "(?i)" + ConvertListToRegexpWithAlternations(listOfNames)
list = GetListOfObjects(tmpDFR, regexp, recursive=1, typeFlag=typeFlags)

return ItemsInList(list)
Expand Down
22 changes: 22 additions & 0 deletions Packages/tests/Basic/UTF_AnalysisBrowserTest.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,25 @@ static Function TryLoadingDifferentFiles()
KillWindow $abWin
KillWindow $sBrowser1
End

static Function TestAB_LoadDataWrapper()

variable numLoaded
string expFilePath
string expName = "TestAB_LoadDataWrapper.pxp"
string wName = "wAvE1"

WAVE/Z wv =root:WAVE1
KillOrMoveToTrash(wv=wv)
wName = UpperStr(wName)
Make root:$wName
SaveExperiment/P=home as expName

PathInfo home
expFilePath = S_path + expName

DFREF tmpDFR = NewFreeDataFolder()
wName = LowerStr(wName) + ";"
numLoaded = MIES_AB#AB_LoadDataWrapper(tmpDFR, expFilePath, "root:", wName, typeFlags=COUNTOBJECTS_WAVES)
CHECK_GT_VAR(numLoaded, 0)
End

0 comments on commit 32da968

Please sign in to comment.