96455284545336409e07953a21e4f963eaef0b70 kent Fri Aug 16 09:30:07 2019 -0700 Adding test cases for tidy function. diff --git src/tabFile/tabToTabDir/tests/input/spec.txt src/tabFile/tabToTabDir/tests/input/spec.txt index 3dd64df..2fb1cd1 100644 --- src/tabFile/tabToTabDir/tests/input/spec.txt +++ src/tabFile/tabToTabDir/tests/input/spec.txt @@ -1,16 +1,20 @@ table a_strex_test id +untidy "big messy string with messy parts" +tidyStart tidy("messy ", "big messy string with messy parts", "") +tidyEnd tidy("", "big messy string with messy parts", " messy") +tidyBoth tidy("messy ", "big messy string with messy parts", " messy") yes ( same("a", "a") ? "yes" : "no") no ( same("a", "b") ? "yes" : "no") cond ( ends("abc", "d") ? "D is cond" : ends("abc", "b") ? "B is cond" : ends("abc", "c") ? "C is cond" : "unmatched") id "constant ID" symboled symbol("ID_", "constant ID") pickedNum pick( 0? 0:"zero", 1:"one") pickedString pick("a"? "b": "beta", "a": "alpha") lowered lower("NotMixedCase") uppered upper("NotMixedCase") stripped strip("constant ID", " aeiou") sub_day_of_month separate(submission_date, '-', 2) neg_day_of_month separate(submission_date, '-', -1) last_word split("constant ID", -1) penultimate_word split("constant ID", -2) replaceSomething replace("something", "", "default value")