Line 4: |
Line 4: |
| | | |
| == Template == | | == Template == |
− | The template for processing adjectives tests: | + | The template for an ingredient and process test is described here: |
| | | |
| [ { | | [ { |
− | Define the language for which the tests are applicable. | + | Define the language ('''lc''') for which the tests are applicable, for example dutch (''nl''). |
− | lc => "en", | + | lc => "nl", |
− | Define in the ingredients_text the original ingredients that must be tested. These should have the format process ingredient, ingredient process, or whatever is applicable for that language. | + | Define in the '''ingredients_text''' the process- ingredient combination that must be tested. In the example we want to test the processed ingredients ''sjalotpoeder'', ''wei-poeder'', vanillepoeder and ''gepelde sjalot''. In this example are ''poeder'' and ''gepelde'' the processes; and ''sjalot'', ''wei'' and ''vanille'' the ingredients. It is important that these processed ingredients are NOT in the ingredients taxonomy. The ingredients taxonomy has precedence over the process taxonomy. |
− | ingredients_text => "raw milk, sliced tomatoes, garlic powder, powdered eggplant, courgette powder" }, | + | ingredients_text => "sjalotpoeder, wei-poeder, vanillepoeder, gepelde sjalot" }, |
| + | |
| + | The ingredients_text ''sjalotpoeder'', should result in the ingredient with id ''en:shallot'' and process ''en:powdered''. These are the key entries in the ingredients and process taxonomy respectively. Usually these are in english (en:). |
| + | [ { |
| + | 'id' => 'en:shallot', |
| + | 'text' => 'sjalot', |
| + | 'processing' => 'en:powdered' |
| + | }, |
| | | |
− | The ingredients_text ''raw milk'', should result in the ingredient with id ''en: raw milk''. The adjective is ignored.
| |
− | [ {
| |
− | 'id' => 'en:raw-milk',
| |
− | 'text' => 'raw milk'
| |
− | },
| |
| The ingredients_text ''sliced tomatoes'', should result in the ingredient with id ''en:tomato'' and processing ''en:sliced''. | | The ingredients_text ''sliced tomatoes'', should result in the ingredient with id ''en:tomato'' and processing ''en:sliced''. |
| { | | { |
Line 44: |
Line 46: |
| } | | } |
| ] ] | | ] ] |
| + | |
| == Error message == | | == Error message == |
| # Failed test at t/ingredients_processing.t line 143. | | # Failed test at t/ingredients_processing.t line 143. |
Line 53: |
Line 56: |
| # $expected->[3]{text} = 'tomaten' | | # $expected->[3]{text} = 'tomaten' |
| 17063 | | 17063 |
| + | [[Category:Processing Taxonomy]] |
| + | [[Category:Testing]] |