mirror of
				https://github.com/taigrr/yq
				synced 2025-01-18 04:53:17 -08:00 
			
		
		
		
	moved string space test to op values test cases
This commit is contained in:
		
							parent
							
								
									540d4953f5
								
							
						
					
					
						commit
						2aab79431c
					
				| @ -12,13 +12,6 @@ var assignOperatorScenarios = []expressionScenario{ | |||||||
| 			"D0, P[], ()::a:\n    b: cat\nx: frog\n", | 			"D0, P[], ()::a:\n    b: cat\nx: frog\n", | ||||||
| 		}, | 		}, | ||||||
| 	}, | 	}, | ||||||
| 	{ |  | ||||||
| 		description: "Create yaml file with value with spaces", |  | ||||||
| 		expression:  `.a.b = "cat" | .x = "frog jumps"`, |  | ||||||
| 		expected: []string{ |  | ||||||
| 			"D0, P[], ()::a:\n    b: cat\nx: frog jumps\n", |  | ||||||
| 		}, |  | ||||||
| 	}, |  | ||||||
| 	{ | 	{ | ||||||
| 		description: "Update node to be the child value", | 		description: "Update node to be the child value", | ||||||
| 		document:    `{a: {b: {g: foof}}}`, | 		document:    `{a: {b: {g: foof}}}`, | ||||||
|  | |||||||
| @ -36,13 +36,22 @@ var valueOperatorScenarios = []expressionScenario{ | |||||||
| 		expected: []string{ | 		expected: []string{ | ||||||
| 			"D0, P[], (!!float)::5e-10\n", | 			"D0, P[], (!!float)::5e-10\n", | ||||||
| 		}, | 		}, | ||||||
| 	}, { | 	}, | ||||||
|  | 	{ | ||||||
| 		document:   ``, | 		document:   ``, | ||||||
| 		expression: `"cat"`, | 		expression: `"cat"`, | ||||||
| 		expected: []string{ | 		expected: []string{ | ||||||
| 			"D0, P[], (!!str)::cat\n", | 			"D0, P[], (!!str)::cat\n", | ||||||
| 		}, | 		}, | ||||||
| 	}, { | 	}, | ||||||
|  | 	{ | ||||||
|  | 		document:   ``, | ||||||
|  | 		expression: `"frog jumps"`, | ||||||
|  | 		expected: []string{ | ||||||
|  | 			"D0, P[], (!!str)::frog jumps\n", | ||||||
|  | 		}, | ||||||
|  | 	}, | ||||||
|  | 	{ | ||||||
| 		document:   ``, | 		document:   ``, | ||||||
| 		expression: `"1.3"`, | 		expression: `"1.3"`, | ||||||
| 		expected: []string{ | 		expected: []string{ | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user