Test trace and addErrorContext
This commit is contained in:
		
							parent
							
								
									5ad263c26b
								
							
						
					
					
						commit
						7880973827
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
					@ -2,6 +2,10 @@ source common.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export TEST_VAR=foo # for eval-okay-getenv.nix
 | 
					export TEST_VAR=foo # for eval-okay-getenv.nix
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					nix-instantiate --eval -E 'builtins.trace "Hello" 123' 2>&1 | grep -q Hello
 | 
				
			||||||
 | 
					! nix-instantiate --show-trace --eval -E 'builtins.addErrorContext "Hello" 123' 2>&1 | grep -q Hello
 | 
				
			||||||
 | 
					nix-instantiate --show-trace --eval -E 'builtins.addErrorContext "Hello" (throw "Foo")' 2>&1 | grep -q Hello
 | 
				
			||||||
 | 
					
 | 
				
			||||||
set +x
 | 
					set +x
 | 
				
			||||||
 | 
					
 | 
				
			||||||
fail=0
 | 
					fail=0
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue