Skip to content

Commit

Permalink
test: add failing case for #390 (only in win32 envs)
Browse files Browse the repository at this point in the history
  • Loading branch information
kherock committed Mar 21, 2019
1 parent afdadae commit cf29c53
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,23 @@ describe("S3rver Tests", function() {
expect(data.ETag).to.match(/"[a-fA-F0-9]{32}"/);
});

it("should store a text object with invalid win32 path characters and retrieve it", async function() {
const reservedChars = '\\/:*?"<>|';
await s3Client
.putObject({
Bucket: buckets[0].name,
Key: `mykey-&-${reservedChars}`,
Body: "Hello!"
})
.promise();

const object = await s3Client
.getObject({ Bucket: buckets[0].name, Key: `mykey-&-${reservedChars}` })
.promise();

expect(object.Body.toString()).to.equal("Hello!");
});

it("should store a text object with no content type and retrieve it", async function() {
const res = await request({
method: "PUT",
Expand Down

0 comments on commit cf29c53

Please sign in to comment.