Below is a list of odkmeta
tests. Unless marked otherwise, all tests are implemented in the cscript. Each test is associated with a unique positive integer ID. IDs are consecutive starting with 137. Some live-project tests with IDs before 137 are stored off GitHub and are not listed in the table below. If you are an IPA employee, contact Matt or Lindsey to gain access.
Contributions of new tests are welcome. When adding a test to the cscript, please add a row to the table below. Further, please add expected datasets, checking them according to [this guide](/doc/develop/cscript/Checking a cscript dataset.md). All datasets should be readable by Stata 11, the minimal supported version.
Note that the .xls
forms in Tests
may differ from the corresponding survey
and choices
.csv
files.
Test ID | Checked by | Area | Form description |
---|---|---|---|
1 | matthew-white | Example test | LindseyAudio_orother.xls: used as an example for the cscript. |
2 | internetlindsey | Basic | Exactly one, extremely simple integer field. The question text should contain a space somewhere in the middle. No field attribute should contain a difficult Stata character, an end-of-line delimiter (\r\n, \n, or \r: http://en.wikipedia.org/wiki/Newline), or a comma. The .csv files for the survey and choices sheets must be saved with the Windows end-of-line (EOL) delimiter (\r\n). Their filenames should not contain spaces. The ODK data .csv filename should not contain spaces. Do not use option -replace-. To overwrite, erase the .dta file yourself beforehand. (You can use the Stata -erase- command for this.) [ID 19] tests -replace-. |
3 | internetlindsey | .csv file | Same as [ID 2], except with the .csv files saved with the \n EOL delimiter instead of \r\n. -odkmeta- should be able to handle .csv files from any OS. |
4 | matthew-white | .csv file | Same as [ID 2], except with the .csv files saved with the \r EOL delimiter instead of \r\n. |
5 | internetlindsey | .csv file | Same as [ID 2], except that the question text should contain \n somewhere in the middle. -odkmeta- should replace it with a space (so multiple, consecutive spaces are likely). |
6 | matthew-white | .csv file | Same as [ID 2], except that the question text should contain \r somewhere in the middle. -odkmeta- should replace it with a space. |
7 | matthew-white | .csv file | Same as [ID 2], except that the question text should contain \r\n somewhere in the middle. -odkmeta- should replace it with a single space, not two. |
8 | internetlindsey | .csv file | Same as [ID 2], except that the question text should contain a comma somewhere in the middle. This is a basic check of -odkmeta-'s .csv parsing. |
9 | internetlindsey | .csv file | Same as [ID 2], except that the question text should contain a quote (") somewhere in the middle. This is a basic check of -odkmeta-'s .csv parsing. |
10 | internetlindsey | .csv file | Same as [ID 2], except that the .csv files for the survey and choices sheets, as well as the .csv file for the ODK data, should all contain spaces in their filenames. |
11 | matthew-white | Attributes | Same as [ID 2], except that one of the field attribute column headers should have at least one uppercase letter. However, the characteristic name for the attribute should still be all lowercase: that's the point of this test. The resulting dataset should be exactly the same as that of [ID 2]. |
12 | internetlindsey | Lists | Exactly one select_multiple field whose question text contains "$". After the -odkmeta- do-file completes, the "$" should be preserved in the variables labels and notes. |
19 | matthew-white | Basic | Same as [ID 2], except use option -replace-. Run the command twice in the do-file to make sure the replacement has a chance to actually happen. The resulting dataset should be exactly the same as that of [ID 2]. |
20 | internetlindsey, matthew-white | Lists | Exactly one select_one field with the following list: name label 1 1 2 2 3 3 99 DK All the labels equals the names except for one case (99 DK). Nonetheless, in the definition of the value label in the final dataset, all the associations should be defined. Defining 1 as 1 is redundant, on one hand, but it's part of the metadata, so it should appear in the value label. In a previous version of -odkmeta-, only 99 DK (the only one not redundant) was defined, and I want to make sure this isn't still happening. The data have instances for all possible values: 1, 2, 3, and 99 (DK). |
21 | internetlindsey, matthew-white | Lists | Same as [ID 20], except that in the list, 99 DK is removed: all the labels equal the names in all cases. Again, all the associations should be defined. Fringe cases like this is part of the motivation for keeping all associations in the value label. If we removed redundant associations, this value label simply wouldn't exist, which would be problematic. |
22 | internetlindsey, matthew-white | Lists | Exactly one select_one field with the following list: name label 1 1 2 2 . Blank This is a case of a string list in which "." is used as a name. (I've seen this used by projects in PocketSurvey. It's trouble!) Other names/labels are all numeric, but ./Blank is string. (By Blank, I really mean the string "Blank" -- I don't mean nothing/empty.) The resulting variable should be numeric and value labeled, and the value label text for ./Blank should be "Blank". The value label value should be 3. It's important that the example data have cases of ./Blank. |
23 | internetlindsey, matthew-white | Lists | Exactly one select_one field with the following list: name label 1 1 2 2 .a .a This looks like an extended missing value, but that isn't a concept in ODK, so the resulting variable should be treated like a "string list": the variable should be numeric and value labeled, and the value label value for .a should be 3. It's important for the example data to have cases of .a. |
24 | matthew-white | Attributes | In the survey sheet, have one attribute (column) named "_all". This is a tough case given the -keepattrib()- and -dropattrib()- options, but the resulting characteristic name should be Odk_all. In a previous version of -odkmeta-, it was Odk_all1, and I want to make sure that isn't happening anymore. |
25 | matthew-white | Attributes | In the survey sheet, have attributes (columns) named: bad_name, group, long_name, repeat, list_name, or_other, and is_other. These are reserved characteristic names, so the resulting characteristics for these attributes should be named Odk_group1 (with the suffix 1), Odk_full_name1, etc. |
27 | internetlindsey | .csv file | Have only two fields, one named ab and the other named a#b. The problem is that Stata will try to -insheet- a#b as ab. The resulting dataset should have ab named ab and a#b named some v# variable, but everything else should be correct: a#b should have a variable label, notes, all the characteristics, and so on. The other thing that should be wrong is the variable name, which -odkmeta- can't really resolve. |
28 | internetlindsey | .csv file | Same as [ID 27], except let's see what happens when we add fields named v1 v2 v3 v4 v5 v6 v7 v8 v9 (after a#b). The variable name for a#b should be the same as in [ID 27], and v1-v9 should all have the correct names, except one of them should be wrong, because a#b's v# name will displace it. So the variable names might get weird, but everything else should be alright. |
29 | internetlindsey | .csv file | Have only one field named thisisaveryveryveryunreasonablylongfieldname. It's OK as an ODK field name, but too long for a Stata name. When imported to Stata, its name should be truncated to thisisaveryveryveryunreasonablyl, but otherwise everything else should be OK. |
32 | NA | Basic | The survey sheet has multiple rows, but the choices sheet has only the headers row. (Tested by [ID 2]. Don't implement.) |
33 | matthew-white | User mistakes | The survey sheet has only the header row. The choices sheet has only the headers row. We have headers but literally nothing else, including no data. |
34 | matthew-white | User mistakes | Same as [ID 36], but the survey sheet has only the headers row. |
35 | matthew-white | User mistakes | Same as [ID 36], but the survey sheet is completely blank. |
36 | internetlindsey | Lists | Exactly one select_one field with the following list: name label 1 A 2 B 3 C |
37 | matthew-white | User mistakes | Same as [ID 2], but the choices sheet is completely blank. |
38 | matthew-white | User mistakes | The survey sheet has only the headers row. The choices sheet is completely blank. |
39 | matthew-white | User mistakes | Both the survey and choices sheets are completely blank. |
40 | matthew-white | User mistakes | The choices sheet has only the headers row. The survey sheet is completely blank. |
41 | matthew-white | Lists | Same as [ID 36], but use option -oneline- and check that the do-file has no #delimit or semicolons. |
42 | NA | Lists | A select_multiple field with all missing values. It should still be split. (Tested by [ID 1]. Don't implement.) |
43 | NA | Lists | A select_multiple field with at least one nonmissing value. It should be split. (Tested by [ID 1]. Don't implement.) |
44 | NA | Lists | Test select_one or_other. (Tested by [ID 1]. Don't implement.) |
45 | NA | Lists | Test select_multiple or_other. (Tested by [ID 1]. Don't implement.) |
46 | NA | Lists | Define a "value label" list as an ODK list that looks like a Stata value label: names are integer, and labels are strings; it's an integer-to-text correspondence. Test a form with more than one value label list. (Tested by [ID 1]. Don't implement.) |
47 | internetlindsey, matthew-white | Lists | Define a "string list" as an ODK list for which one or more names are noninteger. For example, a list with name=NewHaven (no space), label="New Haven" (with space) would be an example of a string list. Test a form with exactly two fields and two lists, both of which are string lists. Let's say the fields are X and Y and the lists are A and B (you can change these in the form). Make X a select_one A and Y a select_one B. I want to test a form with multiple string lists. |
48 | matthew-white | Basic | Same as [ID 1], but the order of the columns is reversed in both survey and choices sheets. The resulting dataset should be exactly the same. |
49 | NA | Lists | A form with a list that we'll call A. Field X is select_multiple A. Field Y is select_multiple A or_other. The number of split variables of X should be one less than the number for Y. (This is where `noother' comes in in the -odkmeta- do-file.) (Tested by [ID 1]. Don't implement.) |
50 | internetlindsey, matthew-white | Field types | A simple form that contains at least the following three fields. A field of date type. A field of time type. A field of today type. [ID 1] already checks types start, end, and datetime. |
51 | NA | Field types | A simple form that contains at least the following three types. A field of acknowledge type. A field of barcode type. A field of calculate type. Together with [ID 1] and [ID 50], this tests all possible field types. (Combined with [ID 50].) |
52 | matthew-white | Basic | Same as [ID 1], but in the survey sheet, rename the type, name, label, and disabled attribute column headers, and in the choices sheet, rename the list_name, name, and label attribute column headers; then use the -survey()- and -choices()- suboptions to specify the new names to -odkmeta-. |
53 | matthew-white | User mistakes | Same as [ID 1], but misspecify the column header of the type field attribute using -survey(, type())-: specify Type instead of type. Column headers are case-sensitive. |
54 | matthew-white | Basic | Same as [ID 2], but the .csv file has no data (but it has the headers row). |
55 | matthew-white | User mistakes | Same as [ID 2], but the .csv file is completely blank. |
56 | internetlindsey | Lists | Same as [ID 36], but make the field select_one or_other. There should be instances of "other" in the data. |
57 | matthew-white | Lists | Same as [ID 56], but specify option -other(max)-. The result should be the same as that of [ID 56]. |
58 | matthew-white | Lists | Same as [ID 56], but specify option -other(min)-. |
59 | matthew-white | Lists | Same as [ID 56], but specify option -other(99)-. |
60 | matthew-white | Lists | Same as [ID 56], but specify option -other(.o)-. .o is a particularly hard value for -other()-, since it's used internally in the do-file, but it should still succeed. |
61 | matthew-white | User mistakes | Same as [ID 36], but make the list name not a Stata name: include an embedded space. (Only change the choices sheet.) |
62 | matthew-white | User mistakes | Same as [ID 36], but make the list name not a Stata name: include a double quote somewhere in the middle. (Only change the choices sheet.) |
63 | matthew-white | User mistakes | Same as [ID 36], but make the list name not a Stata name: include a leading number. (Only change the choices sheet.) |
64 | matthew-white | User mistakes | Same as [ID 36], but make the list name not a Stata name: include a left single quote somewhere in the middle. (Only change the choices sheet.) |
65 | matthew-white | User mistakes | Same as [ID 36], but make the list name after select_one in the survey sheet not a Stata name: include an embedded space. Don't change the choices sheet. |
66 | matthew-white | User mistakes | Same as [ID 36], but make the list name after select_one in the survey sheet not a Stata name: include a double quote somewhere in the middle. Don't change the choices sheet. |
67 | matthew-white | User mistakes | Same as [ID 36], but make the list name after select_one in the survey sheet not a Stata name: include a leading number. Don't change the choices sheet. |
68 | matthew-white | User mistakes | Same as [ID 36], but make the list name after select_one in the survey sheet not a Stata name: include a left single quote somewhere in the middle. Don't change the choices sheet. |
71 | matthew-white | Basic | Same as [ID 2], but don't specify the .do extension in the -using- qualifier. -odkmeta- should still create a do-file. |
72 | internetlindsey, matthew-white | Lists | Exactly one select_one field with the following list (the order of the rows matters): name label 3 3 2 2 1 1 DK DK The name "DK" is a string value, so the list is treated as a "string list." The resulting variable should be numeric and value labeled with the following value label: 1 3 2 2 3 1 4 DK That is, the first value of the list (3) is given the value label TEXT of 3, but it's value is really 1. You can use -label list- or -browse, nolabel- to confirm this. |
73 | matthew-white | Basic | Same as [ID 2], but don't specify the .csv extensions in -csv()-, -survey()-, or -choices()-. It shouldn't matter: the result should be the same as [ID 2]. |
74 | matthew-white | relax |
Test of -relax-. Same as [ID 2], but add a field to the survey sheet that doesn't exist. The result should be the same as that of [ID 2]. |
75 | matthew-white | Basic | Same as [ID 2], but the .csv filenames specified to -csv()-, -survey()-, and -choices()- are enclosed by double quotes. |
76 | matthew-white | Basic | Same as [ID 52], but the .csv filenames specified to -csv()-, -survey()-, and -choices()- are enclosed by double quotes. |
77 | matthew-white | Basic | Same as [ID 2], but the type field attribute is named t`ype with the left single quote. (This test fails, but I think that's OK. It'd take significant rewriting to fix it.) |
80 | matthew-white | .csv file | Similar to [ID 27]. Have exactly three fields, one named ab, one named a#b, and one named a^b (if # and ^ don't work, choose any two distinct symbols other than - or _). The problem is that Stata will try to -insheet- a#b and a^b as ab. The resulting dataset should have ab named ab; a#b and a^b named some v# variable; but everything else correct: a#b and a^b should have variable labels, notes, all the characteristics, and so on. The only thing that should be wrong is the variable names, which -odkmeta- can't really resolve. LS: updated to ab, a.b and a..b, because the only characters allowed are letter, number, underscore, dash, period |
81 | matthew-white | relax |
Same as [ID 28], but add a field that doesn't exist and use option -relax-. I want to test the interaction of `namevars' and -relax-. |
82 | matthew-white | User mistakes | Same as [ID 36], but the choices sheet is missing. The do-file should result in an error. |
83 | matthew-white | Lists | Same as [ID 36], but the choices sheet contains an extra, unused list. The result should be the same as [ID 36]. |
84 | matthew-white | .csv file | A form with two fields named ab and a.b. Stata will give a.b some v# name. Also include in the forms five fields named v1-v5. Normally they would conflict with a.b's v# name, but put them in a group. There should be no conflict, and these v# fields in the group should import completely correctly, even their variable names. |
85 | matthew-white | .csv file | Same as [ID 2], except that the field is named v1. This is a v# name, but it is unproblematic, so there should be no use of `fields'. |
86 | matthew-white | .csv file | Have a geopoint field with a v# name. Before the field, have a number of fields whose names don't -insheet- well, such that one of the fields will get the same v# name as the geopoint field. Since the geopoint variable names have suffixes, the geopoint field should be completely unaffected. |
87 | matthew-white | Lists | Same as [ID 21], but make replace 1 as A in the name and label, 2 as B, and 3 as C: I want to test a string list such that all names equal all labels. |
89 | matthew-white | Basic | Same as [ID 2], but the question text is blank. |
90 | matthew-white | Basic | Same as [ID 2], but the question text should be longer than 80 characters. |
91 | matthew-white | .csv file | Let's test duplicate column headers in the survey sheet. Have two attributes with the same name (e.g., hint). Only the first should be imported. Have two attributes with the same name such that the name is "reserved" (e.g., label, type, name, etc.). Only the first should be imported. Have two attributes with different names but with similar enough names that their characteristic names would be the same (e.g., constraint_message vs. "constraint message"). Both should be imported. Have an attribute whose name is not reserved but whose characteristic name would be that of a reserved name, e.g., "long name" becomes long_name. This attribute should still be imported. The rule is: duplicate headers are ignored, but duplicate characteristic names shouldn't mess us up. |
92 | matthew-white | Lists | Exactly one field, a select_one or_other with a string list (at least one name is noninteger). It's important that there are instances of other and of not other in the data |
93 | matthew-white | Lists | Exactly one field, a select_multiple (not or_other) with a string list (at least one name is noninteger). |
94 | matthew-white | Lists | Exactly one field, a select_multiple or_other with a string list (at least one name is noninteger). It's important that there are instances of other and of not other in the data |
96 | matthew-white | Basic | Same as [ID 1], but the disabled attribute of the disabled field is "yes " with a space instead of "yes". The result should be the same as [ID 1]. |
98 | matthew-white | Groups and repeats | Same as [ID 84], but "begin group" is replaced with begin_group, and "end group" is replaced with end_group. The result should be the same as [ID 84]. |
101 | matthew-white | Attributes | Similar to [ID 25]. In the survey sheet, have an attribute (column) named geopoint. This is a reserved characteristic name, so the resulting characteristic for this attribute should be named Odk_geopoint1 (with the suffix 1). |
102 | matthew-white | Field types | [ID 99] initially failed because a datetime field had all missing values. For this one, create a form with fields of these types: date datetime end geopoint note "select_one list" "select_one list or_other" "select_multiple list" "select_multiple list or_other" start time today. In the data itself, have one observation with all missing values for these variables: the cells should be completely blank. Don't worry about other field types, which don't have special code in the do-file, so shouldn't have any potential issues with missing values. |
103 | matthew-white | .csv file | Let's test fields that result in multiple variables (those of type geopoint or select or_other) whose names are long enough that the variable suffix is truncated but not so long that there are duplicates. Let's have a form with exactly six fields: 1. geopoint field whose name is exactly 30 characters long. Latitude and Longitude will be truncated to La and Lo, but there still won't be duplicate variable names. We'll see the use of `varsuf'. 2. geopoint field whose name is exactly 31 characters long. Latitude and Longitude will be truncated to L and L, so there will be duplicates. We'll see the use of `pos' and `fields' but not `varsuf'. 3. select_one or_other field whose name is exactly 31 characters long. _other will be truncated to "_", but there still won't be duplicate variable names. We'll see the use of `varsuf'. 4. select_one or_other field whose name is exactly 32 characters long. _other will be truncated completely, so there will be duplicates. We'll see the use of `pos' and `fields'. 5. select_multiple or_other field whose name is exactly 31 characters long. _other will be truncated to "_", but there still won't be duplicate variable names. We'll see the use of `varsuf'. 6. select_multiple or_other field whose name is exactly 32 characters long. _other will be truncated completely, so there will be duplicates. We'll see the use of `pos' and `fields'. This test also tests multivariable fields with variables whose Stata names would be duplicates with other variables of the same field. |
104 | matthew-white | .csv file | Similar to [ID 103], but let's test easier cases of multivariable fields with un-insheetable variable names. Have three multivariable fields: one geopoint, one select_one or_other, and one select_multiple or_other. Then have three corresponding integer fields whose names will result in the duplicates. For example, you could have a geopoint field named mygeo and an integer field named mygeoLatitude or "mygeo.Latitude". The two fields have different field names, but one of the variables associated with mygeo (mygeo-Latitude) will have a Stata name that conflicts with that of mygeoLatitude. For this conflict to occur, have the integer come before the multivariable field: here, mygeoLatitude should come before mygeo. For the select or_other fields, it doesn't matter whether the corresponding integer conflicts with the select variable or the "other" variable. For example, if you have a select_one or_other field named myselect, the integer could be named "my.select" (producing a conflict with the select variable) or "my.select_other" (producing a conflict with the "other" variable). |
106 | matthew-white | Lists | A form with a select_one field (X) that's preceded by another field (Y). X's list should have names that are all integer. 1=dog 2=cat, and so on. There's a skip pattern such that X is asked only for some values of Y. In the data, there should be missing and nonmissing values of X: I want to test that the missing values stay missing in the import. This sounds like a pretty simple test, but I just fixed it! |
107 | matthew-white | Lists | Exactly one select_one field with the following list: name label 1 1 1.5 1.5 2 2 I want to test lists with names that are all numeric but not all integer. Previously these were imported as value labels, but they should be imported as string lists. |
108 | matthew-white | Basic | Same as [ID 2], but the .csv filenames specified to -csv()-, -survey()-, and -choices()- contain embedded spaces. They should be enclosed by double quotes. |
109 | matthew-white | Basic | Same as [ID 2], but the .csv filenames specified to -csv()-, -survey()-, and -choices()- contain embedded spaces. They should not be enclosed by double quotes. |
110 | matthew-white | Groups and repeats | A form that looks like this: type name whatever A begin group G whatever B end group G whatever C (Feel free to change any of the names.) I want to test just about the simplest possible form with a group. |
111 | matthew-white | Groups and repeats | A form that looks like this: type name whatever A begin repeat R whatever B end repeat R whatever C (Feel free to change any of the names.) I want to test just about the simplest possible form with a repeat group. |
112 | matthew-white | Groups and repeats | Let's test nested groups: type name begin group G1 whatever A begin group G2 whatever B end group G2 end group G1 |
113 | matthew-white | Groups and repeats | Let's test nested repeat groups. This isn't exactly parallel to [ID 112]: the parent repeat group contains two child repeat groups. type name whatever A begin repeat R1 whatever B begin repeat R2 whatever C end repeat R2 begin repeat R3 whatever D end repeat R3 end repeat R1 |
114 | matthew-white | Groups and repeats | Same as [ID 111], but there should be absolutely no repeat instances. The repeat group .csv file should be totally, completely blank other than the column names row. |
115 | matthew-white | Groups and repeats | Let's now try groups and repeat groups interacting with each other. We'll have a form in which a repeat group is inside a group and a group is inside a repeat group: type name whatever A begin group G1 whatever B begin repeat R1 whatever C begin group G2 whatever D end group G2 end repeat R1 end group G1 |
116 | matthew-white | Groups and repeats | (DON'T MAKE A FORM FOR THIS. Matt will modify [ID 2].) Let's try immediately successive/nested groups. These are supposed to look a certain way in the -odkmeta- do-file. type name begin group G1 begin group G2 whatever A end group G2 end group G1 |
117 | matthew-white | Groups and repeats | Let's test "begin group" immediately following "end group": type name begin group G1 whatever A end group G1 begin group G2 whatever B end group G2 |
118 | NA | Groups and repeats | (Don't implement this; tested by [ID 113].) Let's test "begin repeat" immediately following "end repeat": type name whatever A begin repeat R1 whatever B end repeat R1 begin repeat R2 whatever C end repeat R2 |
119 | matthew-white | User mistakes | Duplicate repeat group names, where the repeat groups are outside groups |
120 | matthew-white | User mistakes | Duplicate repeat group names, where the repeat groups are inside groups |
121 | NA | relax |
(Don't implement: same as [ID 183].) Let's test -relax- with repeat groups. There should be exactly one field that doesn't exist, within a repeat group. Check the resulting warning message -- it should mention the repeat group name. |
122 | matthew-white | relax |
Let's test -relax- with repeat groups. There should be exactly two fields that don't exist, within a repeat group; there should also be exactly one other field that doesn't exist, outside a repeat group. Check the resulting warning messages -- they should mention the repeat group name where relevant. |
123 | NA | Groups and repeats | Let's test repeat groups with the same short name but different full names: type name whatever A begin group G1 begin repeat duplicate_name whatever B end repeat duplicate_name end group G1 begin group G2 begin repeat duplicate_name whatever C end repeat duplicate_name end group G2 (Note from Lindsey: this form is not allowed. Repeat groups must have different short names AND different long names.) |
124 | matthew-white | Groups and repeats | Randomly generate some number of group/repeat group arrangements, valid or otherwise, then send them to -odkmeta- and see how it responds. No need to check the data -- let's just check its basic response. |
137 | matthew-white | Lists | Same as [ID 92], but the list is ordered reverse alphabetically according to name in the choices sheet (in [ID 92], it is ordered alphabetically). The values of the value label should reflect the order of the values in the choices sheet, not the alphabetical order. |
138 | matthew-white | Lists | Same as [ID 36], but the type is "select one" instead of select_one. The result should be the same as [ID 36]. |
139 | matthew-white | Lists | Same as [ID 1], but use "select_one or other" and "select_multiple or other". The result should be the same as [ID 1]. |
140 | matthew-white | Lists | Same as [ID 1], but use "select one or other". The result should be the same as [ID 1]. |
141 | internetlindsey, matthew-white | Field types | Same as [ID 1], but make date values in the data DMY instead of MDY; time values hm instead of hms; and datetime values DMYhms instead of MDYhms. This will test the `datemask', `timemask', and `datetimemask' locals at the top of the do-file. |
142 | internetlindsey, matthew-white | Lists | Same as [ID 93], except the field name ends in a number. Before the select_multiple variable is split, -odkmeta- will add an underscore to the variable name (otherwise it'd be a mess of numbers at the end). |
143 | internetlindsey | Lists | Same as [ID 142], but with the following twist. Let's say the single field in [ID 142] was named favfruit1. The do-file would want to rename the variable to favfruit1_ before splitting. Except... Let's add an integer field to the form named favfruit1_, the name that the select_multiple variable favfruit1 would be renamed to. The do-file should now not try to add the underscore to favfruit1. |
144 | internetlindsey | Lists | Same as [ID 143], except favfruit1_ is named favfruit1_1. The idea is that favfruit1 can be split as-is, but while it can be renamed to favfruit1_, it can't be split after that rename -- therefore it shouldn't be renamed at all and should just be split as-is even though it'll result in messiness. This was actually a problem with an IPA project's data! |
145 | matthew-white | Field types | I realized that [ID 1] only has datetime values, so [ID 141] isn't as full a test as I meant it to be. This test will be the same as [ID 50], but make date values in the data DMY instead of MDY; time values hm instead of hms; and datetime values DMYhms instead of MDYhms. This will test the `datemask', `timemask', and `datetimemask' locals at the top of the do-file. |
146 | matthew-white | Groups and repeats | Exactly the same as [ID 113], including the same data, but don't reshape and merge: check the unmerged .dta files. |
147 | matthew-white | Groups and repeats | Exactly the same as [ID 115], including the same data, but don't reshape and merge: check the unmerged .dta files. |
148 | matthew-white | .csv file | Same as [ID 1], but the .csv filename contains a period in its base name, i.e., a period other than the one in ".csv". |
149 | matthew-white | User mistakes | Check that this form results in an error: type name begin repeat A whatever F1 begin repeat B whatever F2 end repeat B end repeat A begin repeat C whatever F3 begin repeat B whatever F4 end repeat B end repeat C |
150 | matthew-white | User mistakes | Duplicate group names, where the groups are outside other groups |
151 | matthew-white | User mistakes | Duplicate group names, where the groups are inside other groups |
152 | matthew-white | User mistakes | Same as [ID 110], except that group G contains a "void group" that contains no fields. The form should look like this: type name whatever A begin group G begin group void_group end group void_group whatever B end group G whatever C |
153 | matthew-white | User mistakes | Same as [ID 111], except that repeat group R contains a "void repeat group" that contains no field. See [ID 152]. |
154 | matthew-white | User mistakes | Same as [ID 110], except that there is no field C and there is no "end group". |
155 | matthew-white | User mistakes | Same as [ID 111], except that there is no field C and there is no "end repeat". |
156 | matthew-white | User mistakes | A form with one disabled field |
157 | matthew-white | Basic | A form with a single field -- no groups or repeats -- whose name is exactly 234 characters long. |
158 | matthew-white | User mistakes | A form with a single field whose name is exactly 235 characters long. |
159 | matthew-white | User mistakes | A form with a single field in a repeat group whose name is exactly 235 characters long. |
160 | matthew-white | User mistakes | A form with a single field in a group whose long name when converted to a Stata variable name is KEY. |
161 | matthew-white | User mistakes | A form with a single field in a group whose long name when converted to a Stata variable name is PARENT_KEY. |
162 | matthew-white | Groups and repeats | A form that looks like this: type name integer SETOFmyrepeat begin repeat myrepeat whatever X end repeat myrepeat The idea is that SETOFmyrepeat will have a duplicate Stata (but not ODK) name with the SET-OF field of repeat group myrepeat. |
163 | internetlindsey | Groups and repeats | A form that looks like this: type name begin repeat myrepeat integer SETOFmyrepeat end repeat myrepeat Same as [ID 162], except that SETOFmyrepeat is in the repeat group instead of among the main fields, and X has been dropped. |
164 | matthew-white | Groups and repeats | Same as [ID 111], except there are no instances (of the main fields or of the repeat group). |
165 | internetlindsey | Groups and repeats | A form that looks like this: type name integer A begin repeat R integer B1 end repeat R Feel free to change any of the field names, but it's important that B1 (the one field in the repeat group) have a field name that ends with a number. |
166 | internetlindsey | Groups and repeats | A form that looks like this: type name integer A begin repeat R integer B1 integer B1_ end repeat R Feel free to change any of the field names, but it's important that B1 (the one field in the repeat group) have a field name that ends with a number and that the field name of B1_ be the same as B1's exact that it has a trailing underscore. |
167 | internetlindsey | Groups and repeats | A form that looks like this: type name integer SETOFmyrepeat begin repeat myrepeat integer SETOFmyrepeat end repeat myrepeat It's sort of a combination of [ID 162] and [ID 163]: the field names of both parent and child SET-OF fields will be un-insheetable. |
168 | NA | Basic | (Don't implement: implemented by [ID 36].) Have a field in the data that's not in the form other than SubmissionDate KEY PARENT_KEY metainstanceID. Check the warning messages using -get_warnings-. For this test, there should be only one warning message: we'll test all the warning messages at once in a later test. |
169 | NA | Basic | (Implemented by [ID 2].) Get that [ID 2] produces no warning messages. |
170 | matthew-white | relax |
Same as [ID 81], but have there be a field in the data not in the form. For example, rename SubmissionDate as _submission_time. I want to test all three warnings at the same time. |
171 | matthew-white | dropattrib() |
Same as [ID 1], but drop the attributes type and "constraint message". Also try dropping the attribute constraint_message just to see what happens -- there should be a warning. |
172 | matthew-white | dropattrib() |
Same as [ID 1], but specify -dropattrib(_all)-. |
173 | matthew-white | dropattrib() |
Same as [ID 172], but also specify attribute "type" to -dropattrib()-. The result should be the same as [ID 172]. |
174 | matthew-white | dropattrib() |
Same as [ID 1], but keep the attributes type and "constraint message". Also try keeping the attribute constraint_message just to see what happens -- there should be a warning. |
175 | matthew-white | dropattrib() |
Same as [ID 1], but specify -keepattrib(_all)-. The result should be the same as [ID 1]. |
176 | matthew-white | dropattrib() |
Same as [ID 1], but specify -keepattrib(_all type)-. The result should be the same as [ID 1]. |
177 | matthew-white | User mistakes | User tries to specify both -keepattrib()- and -dropattrib()- |
178 | matthew-white | dropattrib() |
Same as [ID 111], but specify -dropattrib(type)-. |
179 | matthew-white | dropattrib() |
Same as [ID 111], but specify -dropattrib(_all)-. |
180 | matthew-white | dropattrib() |
Same as [ID 111], but specify -keepattrib(type)-. |
181 | matthew-white | dropattrib() |
Same as [ID 111], but specify -keepattrib(_all)-. |
182 | matthew-white | relax |
Same as [170], but specify -dropattrib(_all)-. I want to test the interaction between -dropattrib()- and -relax-. |
183 | matthew-white | relax |
A form that looks like this: type name whatever A begin repeat R whatever B whatever DoesntExist end repeat R whatever C Where DoesntExist doesn't exist in the data. I want to test the interaction between -relax- and repeat groups. |
184 | matthew-white | Groups and repeats | Add a field to [ID 111] that exists in the data (importantly: in the repeat group) but not the form. I want to test the warning message for datanotform for fields in repeat groups. |
185 | matthew-white | User mistakes | Check error message when -specialexp()- is not installed. |
186 | matthew-white | User mistakes | Same as [ID 36], but specify -other(junk)-. |
187 | matthew-white | User mistakes | Run the same -odkmeta- command twice without specifying -replace-. |
188 | matthew-white | User mistakes | Specify a nonexistent column header to -survey, type())-. |
189 | matthew-white | User mistakes | Make all the fields disabled. |
190 | matthew-white | User mistakes | Test a bad repeat group merge such that there is no overlap between the variable lists in two datasets (see local `overlap'). |
191 | matthew-white | specialexp() |
Same as [ID 21], but make a value name of a list \`'. |
192 | matthew-white | specialexp() |
Same as [ID 21], but make a value label of a list \`'. |
193 | matthew-white | specialexp() |
Same as [ID 21], but make the hint attribute of varname be \`'. |
194 | matthew-white | specialexp() |
Same as [ID 21], but for a value of a list, make both name and label \`'. |
195 | matthew-white | specialexp() |
Same as [ID 21], but make the label attribute of varname be \`'. |
196 | matthew-white | specialexp() |
Same as [ID 12], but make the hint attribute be \`'. |
197 | internetlindsey | Lists | A single select_one field with the following list: name label 1 1 01 01 001 001 |
198 | matthew-white | User mistakes | The user does not specify -using-. |
199 | matthew-white | Basic | Same as [ID 1], but the column header of the hint attribute is un-insheetable, so -load_csv()- gives it a v# variable name; but that name is used by another column. |
200 | matthew-white | User mistakes | Invalid name attribute in the survey sheet: a name is more than one word. |
201 | matthew-white | User mistakes | Same as [ID 36], but a name in the choices sheet is missing. |
202 | matthew-white | User mistakes | Same as [ID 36], but a label in the choices sheet is missing. |
203 | matthew-white | Groups and repeats | Same as [ID 84], but rename fields v1-v5 as 1-5, and rename the group in which they are nested as v. Then v-3 will conflict with the Stata name of a.b, which is v3, since a.b conflicts with ab. |
204 | matthew-white | User mistakes | The survey worksheet is a single field followed by a "begin group" row. (There is no "end group" row.) |
205 | matthew-white | User mistakes | The survey worksheet is a "begin group" row without an "end group"; there are no fields. |
206 | matthew-white | User mistakes | The survey worksheet is a single field followed by a "begin repeat" row. (There is no "end repeat" row.) |
207 | matthew-white | User mistakes | The survey worksheet is a "begin repeat" row without an "end repeat"; there are no fields. |
208 | matthew-white | Basic | Same as [ID 2], but there is a nonblank disabled attribute not equal to "blank". |
209 | matthew-white | Groups and repeats | A form that looks like this: type name integer SETOFmygroupmyrepeat begin group mygroup begin repeat myrepeat integer SETOFmyrepeat end repeat myrepeat end group mygroup |
210 | boyercb | shortnames |
Test of -shortnames-. Same as [ID 115] |