diff --git a/build.sh b/build.sh index 8943fd001..709cdb556 100755 --- a/build.sh +++ b/build.sh @@ -16,7 +16,7 @@ # with this program. If not, see . cd "$(dirname "$0")" || exit - +ANDROID_HOME="/home/foralost/Android/Sdk" ADB="${ANDROID_HOME}/platform-tools/adb" ANDROID_OUTPUTS_DIR="uhabits-android/build/outputs" AVDMANAGER="${ANDROID_HOME}/cmdline-tools/latest/bin/avdmanager" diff --git a/uhabits-core/assets/test/csv_export/002 Wake up early/Checkmarks.csv b/uhabits-core/assets/test/csv_export/002 Wake up early/Checkmarks.csv index 89f788f68..b871c4c35 100644 --- a/uhabits-core/assets/test/csv_export/002 Wake up early/Checkmarks.csv +++ b/uhabits-core/assets/test/csv_export/002 Wake up early/Checkmarks.csv @@ -1,10 +1,10 @@ -2015-01-25,2 -2015-01-24,0 -2015-01-23,1 -2015-01-22,2 -2015-01-21,2 -2015-01-20,2 -2015-01-19,1 -2015-01-18,1 -2015-01-17,2 -2015-01-16,2 +2015-01-25,YES_MANUAL +2015-01-24,NO +2015-01-23,YES_AUTO +2015-01-22,YES_MANUAL +2015-01-21,YES_MANUAL +2015-01-20,YES_MANUAL +2015-01-19,YES_AUTO +2015-01-18,YES_AUTO +2015-01-17,YES_MANUAL +2015-01-16,YES_MANUAL diff --git a/uhabits-core/assets/test/csv_export/Checkmarks.csv b/uhabits-core/assets/test/csv_export/Checkmarks.csv index c0788570b..f03bece31 100644 --- a/uhabits-core/assets/test/csv_export/Checkmarks.csv +++ b/uhabits-core/assets/test/csv_export/Checkmarks.csv @@ -1,11 +1,11 @@ Date,Meditate,Wake up early, -2015-01-25,-1,2, -2015-01-24,-1,0, -2015-01-23,-1,1, -2015-01-22,-1,2, -2015-01-21,-1,2, -2015-01-20,-1,2, -2015-01-19,-1,1, -2015-01-18,-1,1, -2015-01-17,-1,2, -2015-01-16,-1,2, +2015-01-25,UNKNOWN,YES_MANUAL, +2015-01-24,UNKNOWN,NO, +2015-01-23,UNKNOWN,YES_AUTO, +2015-01-22,UNKNOWN,YES_MANUAL, +2015-01-21,UNKNOWN,YES_MANUAL, +2015-01-20,UNKNOWN,YES_MANUAL, +2015-01-19,UNKNOWN,YES_AUTO, +2015-01-18,UNKNOWN,YES_AUTO, +2015-01-17,UNKNOWN,YES_MANUAL, +2015-01-16,UNKNOWN,YES_MANUAL, diff --git a/uhabits-core/assets/test/csv_export/Habits.csv b/uhabits-core/assets/test/csv_export/Habits.csv index 672189f33..5770942d6 100644 --- a/uhabits-core/assets/test/csv_export/Habits.csv +++ b/uhabits-core/assets/test/csv_export/Habits.csv @@ -1,3 +1,3 @@ -Position,Name,Question,Description,NumRepetitions,Interval,Color -001,Meditate,Did you meditate this morning?,,1,1,#FF8F00 -002,Wake up early,Did you wake up before 6am?,,2,3,#00897B +Position,Name,Question,Description,NumRepetitions,Interval,Color,Unit,Target Type,Target Value +001,Meditate,Did you meditate this morning?,,1,1,#FF8F00,,AT_LEAST,0.0 +002,Wake up early,Did you wake up before 6am?,,2,3,#00897B,,AT_LEAST,0.0 diff --git a/uhabits-core/src/jvmTest/java/org/isoron/uhabits/core/io/HabitsCSVExporterTest.kt b/uhabits-core/src/jvmTest/java/org/isoron/uhabits/core/io/HabitsCSVExporterTest.kt index bbe069be8..15bc959c7 100644 --- a/uhabits-core/src/jvmTest/java/org/isoron/uhabits/core/io/HabitsCSVExporterTest.kt +++ b/uhabits-core/src/jvmTest/java/org/isoron/uhabits/core/io/HabitsCSVExporterTest.kt @@ -112,6 +112,9 @@ class HabitsCSVExporterTest : BaseUnitTest() { file.deleteOnExit() copyAssetToFile(assetFilename, file) + println(file.path) + println(assetFilename) + assertTrue( FileUtils.contentEquals( file, diff --git a/uhabits-core/src/jvmTest/java/org/isoron/uhabits/core/models/HabitListTest.kt b/uhabits-core/src/jvmTest/java/org/isoron/uhabits/core/models/HabitListTest.kt index f4cecda6f..c62249f37 100644 --- a/uhabits-core/src/jvmTest/java/org/isoron/uhabits/core/models/HabitListTest.kt +++ b/uhabits-core/src/jvmTest/java/org/isoron/uhabits/core/models/HabitListTest.kt @@ -206,9 +206,9 @@ class HabitListTest : BaseUnitTest() { list.add(h2) val expectedCSV = """ - Position,Name,Question,Description,NumRepetitions,Interval,Color - 001,Meditate,Did you meditate this morning?,this is a test description,1,1,#FF8F00 - 002,Wake up early,Did you wake up before 6am?,,2,3,#AFB42B + Position,Name,Question,Description,NumRepetitions,Interval,Color,Unit,Target Type,Target Value + 001,Meditate,Did you meditate this morning?,this is a test description,1,1,#FF8F00,,AT_LEAST,0.0 + 002,Wake up early,Did you wake up before 6am?,,2,3,#AFB42B,,AT_LEAST,0.0 """.trimIndent() val writer = StringWriter()