add a parsedate test
This commit is contained in:
		
							parent
							
								
									470cae55ca
								
							
						
					
					
						commit
						22728c5c07
					
				
							
								
								
									
										4
									
								
								Tests.hs
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								Tests.hs
									
									
									
									
									
								
							@ -97,6 +97,10 @@ misc_tests = TestList [
 | 
				
			|||||||
  "timeLog" ~: do
 | 
					  "timeLog" ~: do
 | 
				
			||||||
    assertparseequal timelog1 (parseWithCtx timelog timelog1_str)
 | 
					    assertparseequal timelog1 (parseWithCtx timelog timelog1_str)
 | 
				
			||||||
  ,
 | 
					  ,
 | 
				
			||||||
 | 
					  "parsedate" ~: do
 | 
				
			||||||
 | 
					    assertequal (parsetimewith "%Y/%m/%d" "2008/02/03" refdate) (parsedate "2008/02/03")
 | 
				
			||||||
 | 
					    assertequal (parsetimewith "%Y/%m/%d" "2008/02/03" refdate) (parsedate "2008-02-03")
 | 
				
			||||||
 | 
					  ,                  
 | 
				
			||||||
  "smart dates"     ~: do
 | 
					  "smart dates"     ~: do
 | 
				
			||||||
    let todaysdate = parsedate "2008/11/26" -- wednesday
 | 
					    let todaysdate = parsedate "2008/11/26" -- wednesday
 | 
				
			||||||
    let str `gives` datestr = assertequal datestr (fixSmartDateStr todaysdate str)
 | 
					    let str `gives` datestr = assertequal datestr (fixSmartDateStr todaysdate str)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user