Bug 474198

Summary: Create "read-file" command.
Product: [Technology] RCPTT Reporter: Ulyana Skorokhodova <ulyana.skorokhodova>
Component: ECLAssignee: Project Inbox <rcptt-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0M4   
Target Milestone: 2.0.1   
Hardware: PC   
OS: Mac OS X   
See Also: https://git.eclipse.org/r/53040
https://git.eclipse.org/c/rcptt/org.eclipse.rcptt.git/commit/?id=ac670fd760733f147771a501b2863eb29cf1ab5f
Whiteboard:

Description Ulyana Skorokhodova CLA 2015-08-04 03:38:59 EDT
To be able to get a full file content for further verifications.
Comment 1 Ulyana Skorokhodova CLA 2015-08-04 03:39:08 EDT
Verified on https://hudson.eclipse.org/rcptt/job/rcptt-all-gerrit/853/

Detected issues:

1) NPE is thrown if the file uri is in wrong format:

read-file "/Users/Ulik_MacAir/Desktop/Screen.png"
2) If the verification fails, e.g.:

read-file -uri "file:/Users/Ulik_MacAir/Desktop/1437489763654.log" | equals "aa" | verify-true
the error message should be like

verification failed: expected: ... but was ...

3) If the file doesn't exist (and there is a verification-true after read-file) it is not shown in failure message:

read-file -uri "file:/Users/Ulik_MacAir/Desktop/14374897636544.log" | equals "aaa" | verify-true
/Users/Ulik_MacAir/Desktop/14374897636544.log
	at read-file (/Project/Test1.test:15)
Comment 2 Ulyana Skorokhodova CLA 2015-08-05 23:04:28 EDT
Verified on https://git.eclipse.org/r/53193:

1) - Fixed. No NPE is thrown. "Failed to resolve" is shown instead;
2) - Fixed. 
3) - Not sure. "Failed to read" message is shown. Probably we need "Failed to resolve" as in #1.
Comment 4 Ulyana Skorokhodova CLA 2015-08-12 03:00:23 EDT
Fixed.