We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a677749 commit 45011aeCopy full SHA for 45011ae
spec/support/shared/examples/rex/image_source/image_source.rb
@@ -0,0 +1,23 @@
1
+shared_examples_for "Rex::ImageSource::ImageSource" do
2
+
3
+ describe "#read_asciiz" do
4
+ let(:offset) { 0 }
5
6
+ it "returns an String" do
7
+ expect(subject.read_asciiz(offset)).to be_kind_of(String)
8
+ end
9
10
+ it "returns a null free String" do
11
+ expect(subject.read_asciiz(offset)).to_not include("\x00")
12
13
14
+ context "when offset bigger than available data" do
15
+ let(:offset) { 12345678 }
16
17
+ it "returns an empty String" do
18
+ expect(subject.read_asciiz(offset)).to be_empty
19
20
21
22
23
+end
0 commit comments