test(tvix/eval): test throw in __toString with toJSON
Change-Id: Ia4a9a04c7e157b6add94dc8901ffab35486fe344 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12731 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
This commit is contained in:
		
							parent
							
								
									f90f14042a
								
							
						
					
					
						commit
						b6e524c726
					
				
					 2 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
					@ -1 +1 @@
 | 
				
			||||||
[ false false false false ]
 | 
					[ false false false false false ]
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,5 +10,8 @@ map (e: (builtins.tryEval (builtins.toJSON e)).success) [
 | 
				
			||||||
    x = 32;
 | 
					    x = 32;
 | 
				
			||||||
    y = builtins.throw "second argument";
 | 
					    y = builtins.throw "second argument";
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    __toString = _: builtins.throw "__toString a";
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
  # FIXME(raitobezarius): we would like to test coercions, i.e. `toFile` and `derivation` containing throwables.
 | 
					  # FIXME(raitobezarius): we would like to test coercions, i.e. `toFile` and `derivation` containing throwables.
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue